// Задача "Генерация тестов"
// 8-ая Интернет-олимпиада сезона 2007-2008, базовый уровень
// Автор задачи: Федор Царев, tsarev@rain.ifmo.ru
// Автор решения: Федор Царев, tsarev@rain.ifmo.ru

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

public class gentest_ft implements Runnable {

	public final static int MAX_N = (int) 2e5;

	private Scanner in;
	private PrintWriter out;
	String fname = "gentest";

	private void myAssert(boolean e, String message) {
		if (!e) {
			throw new Error("Assertion failure!!! " + message);
		}
	}                               

	public void solve() {
		int n = in.nextInt();
		myAssert(1 <= n && n <= 300, "");
		Random r = new Random(239);
		while (true) {
			int[] x = new int[n];
			int[] y = new int[n];
			for (int i = 0; i < n; i++) {
				x[i] = r.nextInt(10001);
				y[i] = r.nextInt(10001);
			}
			boolean good = true;
			outer:
			for (int i = 0; i < n; i++) {
				for (int j = i + 1; j < n; j++) {
					int a = y[i] - y[j];
					int b = x[j] - x[i];
					if (a == 0 && b == 0) {
						good = false;
						break outer;
					}
					int c = -a * x[i] - b * y[i];
					for (int k = j + 1; k < n; k++) {
						if (a * x[k] + b * y[k] + c == 0) {
							good = false;
							break outer;
						}
					}
				}
			}
			if (good) {
				out.println("YES");
				for (int i = 0; i < n; i++) {
					out.println(x[i] + " " + y[i]);
				}
				break;
			}
		}
	}

	public void run() {
		try {
			solve();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		} finally {
			out.close();
		}		
	}

	public gentest_ft() {
		try {
			in = new Scanner(new File(fname + ".in"));
			out = new PrintWriter(new File(fname + ".out"));
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}


	public static void main(String[] args) {
		Locale.setDefault(Locale.US);
		new Thread(new gentest_ft()).start();
	}

}                                      