import java.io.PrintWriter;
import java.util.Random;


public class TestGenerator{

	final static int MAX = 10000;
	final static int MAX_N = 100000;
	
	public static int randomInt(Random rand, int modulo) {
		return java.lang.Math.abs(rand.nextInt()) % modulo;
	}
	
	public static void main(String[] args) {
		PrintWriter out = new PrintWriter(System.out);
		
		Random rand = new Random();
		int n = randomInt(rand, MAX_N) + 1;
		int bx = rand.nextInt() % (MAX + 1);
		int by = rand.nextInt() % (MAX + 1);
		int l = randomInt(rand, 5001);
		out.println(n + " " + bx + " " + by + " " + l);
		int con = Integer.parseInt(args[0]);
		for(int i = 0; i < n; ++i) {
			if (randomInt(rand, con) == 0) {
				int x = rand.nextInt() % (MAX + 1);
				int y = rand.nextInt() % (MAX + 1);
				while((x - bx) * (x - bx) + (y - by) * (y - by) > l * l) {
					x = rand.nextInt() % (MAX + 1);
					y = rand.nextInt() % (MAX + 1);
				}
				out.println(x + " " + y);
			}
			else {
				int x = rand.nextInt() % (MAX + 1);
				int y = rand.nextInt() % (MAX + 1);
				while((x - bx) * (x - bx) + (y - by) * (y - by) <= l * l) {
					x = rand.nextInt() % (MAX + 1);
					y = rand.nextInt() % (MAX + 1);
				}
				out.println(x + " " + y);
			}
		}
		
		
		out.close();
	}

}
