//Problem "GenTest"
//8th Internet Olympiad, season 2007-2008
//Problem Author:  Fedor Tsarev, tsarev@rain.ifmo.ru
//Solution Author: Vladimir Ulyantsev, ulyantsev@rain.ifmo.ru

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

public class gentest_vu {

	public static void main(String[] args) throws IOException {
		Scanner in = new Scanner(new File("gentest.in"));
		PrintWriter out = new PrintWriter(new File("gentest.out")); //System.out

		Random rand = new Random(239239);
		int n = in.nextInt();
		out.println("YES");

		for (int i = 0; i < n; i++) {
			out.println(rand.nextInt(2 * 10000 + 1) - 10000 + " " + (rand.nextInt(2 * 10000 + 1) - 10000));
		}

		in.close();
		out.close();
	}

}