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

public class TestsGen implements Runnable {
    public static void main(String[] args) {
        if (args.length < 1) {
            for (I = 1; (new File(getName(I) + ".t")).exists(); I++)
                ;
        } else {
            I = Integer.parseInt(args[0]);
        }
        new Thread(new TestsGen()).start();
    }

    PrintWriter out, comment;

    Random rand = new Random(6439586L);

    static int I;

    static String getName(int i) {
        return ((i < 10) ? "0" : "") + i;
    }

    void open() {
        try {
            System.out.println("Generating test " + I);
            out = new PrintWriter(getName(I));
            comment.print("Generating test " + I + ": ");
        } catch (FileNotFoundException e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    void close() {
        out.close();
        I++;
    }

    final String ALPHA = "abcdefghijklmnopqrstuvwxyz";
    final String ALPHA_EXT = ALPHA + ALPHA.toUpperCase();

    String randString(int len, String alpha) {
        StringBuilder ans = new StringBuilder();
        int k = alpha.length();
        for (int i = 0; i < len; i++) {
            ans.append(alpha.charAt(rand.nextInt(k)));
        }
        return ans.toString();
    }

    long rand(long l, long r) {
        return l + (rand.nextLong() >>> 1) % (r - l + 1);
    }

    int rand(int l, int r) {
        return l + rand.nextInt(r - l + 1);
    }

    final int MAX = 1000;
    final int MAX_V = 1000;
    
    void genTest(int MAX, int MAX_V) {
	open();
	while (true) {
	    int x1 = rand(-MAX, MAX);
	    int y1 = rand(-MAX, MAX);
	    int x2 = rand(-MAX, MAX);
	    int y2 = rand(-MAX, MAX);
	    int x3 = rand(-MAX, MAX);
	    int y3 = rand(-MAX, MAX);
	    if ((x2 - x1) * (y3 - y1) == (y2 - y1) * (x3 - x1))  continue;
	    
	    out.println(x1 + " " + y1 + " " + x2 + " " + y2 + " " + x3 + " " + y3);
	    out.println(rand(-MAX, MAX) + " " + rand(-MAX, MAX));
	    
	    while (true) {
		int v1 = rand(1, MAX_V);
		int v2= rand(1, MAX_V);
		if (!(1 <= v2 && v2 < v1)) continue;
		out.println(v1 + " " + v2);
		break;
	    }
	    break;
	}
	close();
    }
        
    public void solve() throws IOException {
        for (int i = 0; i < 10; ++i) {
            genTest(10, 10);
        }
        for (int i = 0; i < 10; ++i) {
            genTest(100, 100);
        }
        for (int i = 0; i < 10; ++i) {
            genTest(MAX, 10);
        }
        for (int i = 0; i < 10; ++i) {
            genTest(10, MAX_V);
        }
        for (int i = 0; i < 10; ++i) {
            genTest(MAX, MAX_V);
        }
    }

  
    void myAssert(boolean e) {
        if (!e) {
            throw new Error("Assertion failed");
        }
    }

    public void run() {
        try {
            comment = new PrintWriter("comments.txt");
            solve();
        } catch (Throwable e) {
            e.printStackTrace();
            System.exit(-1);
        } finally {
            comment.close();
        }
    }
}