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

public class gentests implements Runnable {
	public static void main(String[] args) {
		if (args.length < 1) {
			throw new Error("Not enough parameters");
		}
		L = Integer.parseInt(args[0]);
		new Thread(new gentests()).start();
	}
	
	PrintWriter out;
	Random rand = new Random(6082573165L);
	
	static int L,I;
	void open() {
		try {
			out = new PrintWriter(((I < 10) ? "0" : "") + I);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}
	void close() {
		out.close();
		I++;
	}
	
	int rand(int l, int r) {
		return l + rand.nextInt(r - l + 1);
	}
	
	int MAX_VAL = 1000000;
	int MIN_VAL = 1; 
	
	void genRandom() {
		open();
		out.println(rand(MIN_VAL, MAX_VAL) + " " + rand(MIN_VAL, MAX_VAL));
		close();
	}
	
	int gcd(int n, int m) {
		  return (n == 0) ? m : gcd(m % n, n);
	}
	
	void genDivis(int d) {
		open();
		int n, m;
		while (true) {
			n = rand(MIN_VAL, MAX_VAL / d);
			m = rand(MIN_VAL, MAX_VAL / d);
			if (gcd(n * d, m * d) == d) break;
		}
		out.println(n * d + " " + m * d);
		close();
	}
	
	void genEqual(int n) {
		open();
		out.println(n + " " + n);
		close();
	}
	public void solve() throws IOException {
		I = L;
		for (int i = 0; i < 6; i++) {
			genEqual(rand(MIN_VAL, MAX_VAL));
		}
		genEqual(MAX_VAL);
		
		for (int i = 0; i < 6; i++) {
			genDivis(rand(MIN_VAL, MAX_VAL));
		}
		genDivis(333333);
		
		for (int i = 0; i < 7; i++) {
			genRandom();
		}
	}

	public void run() {
		try {
			solve();
		} catch (IOException e) {
			
		}
		
	}

}
