import java.util.*;

public class GenRandom {
	
	private static final int MAX_N = 100000;
	private static final int MAX_T = 1000000;
	private static final int MAX_W = 1000000;
	static Random rand;
	
	public static void main(String[] args) {
		rand = new Random();
		int n = rand.nextInt(MAX_N) + 1;
		System.out.println(n);
		HashSet<Integer> list = new HashSet<Integer>();
		int t = -1, w = -1;
		for(int i = 0; i < n; ++i) {
			t = 1 + rand.nextInt(MAX_T);
			w = 1 + rand.nextInt(MAX_W);
			while(list.contains(w)) {
				w = 1 + rand.nextInt(MAX_W);
			}
			System.out.println(t + " " + w);
			list.add(w);
		}
	}
} 