import java.io.*; /** * A wrong solution for Assessment Disruption. * This is a solution which can produce identical points. * Since a correct solution with duplicates fails on the first sample, the `v` is adjusted a little so that it does not happen. */ public class assessment_mb_duplicates { 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)); int v = n == 3 ? 2 : n / 3; int w = n - v; for (int i = 0; i < n; ++i) { int x = i < w ? v + 1 : n - 1 - i; int myWordCount = wordCount + x <= MAX_WORD_COUNT ? wordCount + x : wordCount - x; out.println(myWordCount + " " + n); } } } }