import java.io.*;
import java.util.*;

public class Gen {

    static int tests = 1;
    static Random rnd = new Random(123);
    final static int MAX = (int) 1e9;

    public void writeTest(int[] a) throws IOException {
        PrintWriter out = new PrintWriter("../tests/"
                + String.format("%02d", tests++));
        out.println(a[0]+" " + a[1]);
        out.close();
    }

    public int[] getExample1() {
        return new int[] {1, 2};
    }
    
    public int[] getExample2() {
        return new int[] {3, 3};
    }

    int[] genRandomTask() {
        return new int[]{1 +rnd.nextInt(MAX), 1+rnd.nextInt(MAX)};
    }
    
    int[] genRandomTaskSmall() {
        return new int[]{1 +rnd.nextInt(20), 1+rnd.nextInt(20)};
    }

    private void gen() throws IOException {
        File dir = new File("../tests");
        if (!dir.exists()) {
            dir.mkdir();
        }
        writeTest(getExample1());
        writeTest(getExample2());
        for (int i = 1; i < 5; i++)
            for (int j = 1; j < 5; j++)
                writeTest(new int[]{i, j});
        for (int i = 0; i < 3; i++)
            writeTest(genRandomTaskSmall());
        for (int i = 0; i < 3; i++)
            writeTest(genRandomTask());
        for (int i = 1; i < 3; i++)
            writeTest(new int[]{MAX, i});
        for (int i = 0; i < 3; i++)
            writeTest(new int[]{1 + rnd.nextInt(10), MAX});
        for (int i = 0; i < 3; i++)
            writeTest(new int[]{MAX - rnd.nextInt(10), MAX - rnd.nextInt(10)});
		for (int i = 0; i < 3; i++)
            writeTest(new int[]{1, 1 + rnd.nextInt(MAX)});
        writeTest(new int[]{MAX, MAX});
    }

    public static void main(String[] args) throws IOException {
        new Gen().gen();
    }
}
