import java.io.*; /** * A wrong solution for Assessment Disruption. * This solution generates antichains. */ public class assessment_mb_antichain { private static final int MAX_WORD_COUNT = 10000; public static void main(String[] args) throws IOException { try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); PrintWriter out = new PrintWriter(System.out)) { String test = in.readLine(); int wsIndex = test.indexOf(' '); int n = Integer.parseInt(test.substring(0, wsIndex)); int wordCount = Integer.parseInt(test.substring(wsIndex + 1)); for (int i = 0; i < n; ++i) { int x = i; int y = n - i; // x >= 0, being minimised, maps to word count being closest to wordCount // Note that the word count must never exceed 10000, so we choose the side wisely int myWordCount = wordCount + x <= MAX_WORD_COUNT ? wordCount + x : wordCount - x; // y >= 0, y <= n, being minimised, maps to quality maximized int quality = n - y; out.println(myWordCount + " " + quality); } } } }