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

public class points_bm {
	FastScanner in;
	PrintWriter out;

	long gcd(long x, long y) {
		return x == 0 ? y : gcd(y % x, x);
	}

	class Point implements Comparable<Point> {
		long x, y;
		int id;

		public Point(long x, long y, int id) {
			super();
			long g = gcd(x, y);
			x /= g;
			y /= g;
			this.x = x;
			this.y = y;
			this.id = id;
		}

		Point middle(Point other) {
			long xx = x * other.y + other.x * y;
			long yy = y * other.y * 2;
			return new Point(xx, yy, -1);
		}

		@Override
		public int compareTo(Point o) {
			if (o.x == x)
				return Long.compare(y, o.y);
			return Long.compare(x, o.x);
		}

	}

	void solve() {
		// long time = System.currentTimeMillis();
		ArrayList<Point> ans = new ArrayList<Point>();
		HashMap<String, Integer> ids = new HashMap<String, Integer>();
		int n = in.nextInt();
		TreeSet<Point> points = new TreeSet<Point>();
		ArrayList<Point> newPoints = new ArrayList<Point>();
		for (int i = 0; i < n; i++) {
			Point tmp = new Point(in.nextInt(), in.nextInt(), i + 1);
			ids.put(Long.toString(tmp.x) + "/" + Long.toString(tmp.y), i + 1);
			points.add(tmp);
			if (tmp.x == 0 || tmp.x == tmp.y) {
				newPoints.add(tmp);
			}
		}
		int it = 0;
		while (it < newPoints.size()) {
			Point p = newPoints.get(it);
			if (points.contains(p))
				points.remove(p);
			for (int i = 0; i < it; i++) {
				Point midPoint = p.middle(newPoints.get(i));
				if (points.contains(midPoint)) {
					newPoints.add(midPoint);
					points.remove(midPoint);
					ans.add(midPoint);
					ans.add(p);
					ans.add(newPoints.get(i));
				}
			}
			it++;
		}
		if (points.size() != 0) {
			out.println("NO");
			out.println(points.first().id);
		} else {
			out.println("YES");
			for (int i = 0; i < ans.size(); i++) {
				Point pp = ans.get(i);
				out.print(ids.get(Long.toString(pp.x) + "/"
						+ Long.toString(pp.y)));
				if (i % 3 == 2)
					out.println(); else
						out.print(" ");
			}
		}
	}

	void run() {
		try {
			in = new FastScanner(new File("points.in"));
			out = new PrintWriter(new File("points.out"));

			solve();

			out.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}

	void runIO() {

		in = new FastScanner(System.in);
		out = new PrintWriter(System.out);

		solve();

		out.close();
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		public FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return null;
				st = new StringTokenizer(s);
			}
			return st.nextToken();
		}

		boolean hasMoreTokens() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return false;
				st = new StringTokenizer(s);
			}
			return true;
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}
	}

	public static void main(String[] args) {
		new points_bm().run();
	}
}