package acm;
import java.io.*;
import java.util.Random;
public class test {
public static void main(String[]args) throws IOException{
int testCase=250;
int people=400;
int car=200;
int speed=2000;
int lim=1000000;
PrintWriter out
= new PrintWriter(new BufferedWriter(new FileWriter("Taxi.txt")));
out.write(String.valueOf(testCase));
out.write("\n");
while(testCase>0){
out.write(String.valueOf(people)+" ");
out.write(String.valueOf(car)+" ");
out.write(String.valueOf(speed)+" ");
out.write(String.valueOf(lim)+"\n");
Random generator = new Random();
for(int i=0;i<people;i++){
int r = generator.nextInt(6);
out.write(String.valueOf(r));
out.write(" ");
r = generator.nextInt(6);
out.write(String.valueOf(r));
out.write("\n");
}
for(int i=0;i<car;i++){
int r = generator.nextInt(8);
out.write(String.valueOf(r));
out.write(" ");
r = generator.nextInt(9);
out.write(String.valueOf(r));
out.write("\n");
}
out.flush();
testCase--;
}
}
}