Problem: Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split them into two sets each containing 4 points so that the points from the first set lay at the vertexes of some square and the points from the second set lay at the vertexes of a rectangle. Each point of initial 8 should belong to exactly one set. It is acceptable for a rectangle from the second set was also a square. If there are several partitions, Petya will be satisfied by any of them. Help him find such partition. Note that the rectangle and the square from the partition should have non-zero areas. The sides of the figures do not have to be parallel to the coordinate axes, though it might be the case.

Input

You are given 8 pairs of integers, a pair per line — the coordinates of the points Petya has. The absolute value of all coordinates does not exceed 104. It is guaranteed that no two points coincide.

Output

Print in the first output line "YES" (without the quotes), if the desired partition exists. In the second line output 4 space-separated numbers — point indexes from the input, which lie at the vertexes of the square. The points are numbered starting from 1. The numbers can be printed in any order. In the third line print the indexes of points lying at the vertexes of a rectangle in the similar format. All printed numbers should be pairwise distinct.

If the required partition does not exist, the first line should contain the word "NO" (without the quotes), after which no output is needed.

Examples

Input

0 0
10 11
10 0
0 11
1 1
2 2
2 1
1 2


Output

YES
5 6 7 8
1 2 3 4


Input

0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7


Output

NO


Input

0 0
4 4
4 0
0 4
1 2
2 3
3 2
2 1


Output

YES
1 2 3 4
5 6 7 8

Note

Pay attention to the third example: the figures do not necessarily have to be parallel to the coordinate axes.

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args) throws IOException {
		new Thread(null, new Runnable() {
			public void run() {
				try {
					long prevTime = System.currentTimeMillis();
					new Main().run();
					System.err.println("Total time: "
							+ (System.currentTimeMillis() - prevTime) + " ms");
					System.err.println("Memory status: " + memoryStatus());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}, "1", 1L << 24).start();
	}

	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		Object o = solve();
		if (o != null)
			out.println(o);
		out.close();
		in.close();
	}

	private Object solve() throws IOException {
		Point[] ps = new Point[8];
		for (int i = 0; i < 8; i++)
			ps[i] = new Point(ni(), ni(), i + 1);
		List<Point> square = new ArrayList<Point>();
		List<Point> rec = new ArrayList<Point>();
		for (int mask = 0; mask < (1 << 8); mask++)
			if (Integer.bitCount(mask) == 4) {
				for (int i = 0; i < 8; i++)
					if ((mask & (1 << i)) == 0) {
						square.add(ps[i]);
					} else {
						rec.add(ps[i]);
					}
				if (square(square) && rec(rec)) {
					out.println("YES");
					show(square);
					show(rec);
					return null;
				} else {
					square.clear();
					rec.clear();
				}
			}
		return "NO";
	}
	double EPS = 1e-9;

	private boolean square(List<Point> square) {
		for (int opp = 1; opp < 4; opp++) {
			List<Point> other = new ArrayList<Point>(square);
			List<Point> us = new ArrayList<Point>();
			us.add(other.remove(opp));
			us.add(other.remove(0));

			Line l1 = new Line(us.get(0), other.get(0));
			Line l2 = new Line(us.get(1), other.get(1));
			Line l3 = new Line(us.get(0), other.get(1));
			Line l4 = new Line(us.get(1), other.get(0));
			if (l1.areParallel(l2) && l3.areParallel(l4) && l1.perpendicular(us.get(0)).areSame(l3)) {
				double d1 = us.get(0).dist(other.get(0));
				double d2 = us.get(0).dist(other.get(1));
				if(Math.abs(d1-d2)<EPS)
					return true;
				
			}
		}
		return false;
	}

	private boolean rec(List<Point> rec) {
		for (int opp = 1; opp < 4; opp++) {
			List<Point> other = new ArrayList<Point>(rec);
			List<Point> us = new ArrayList<Point>();
			us.add(other.remove(opp));
			us.add(other.remove(0));

			Line l1 = new Line(us.get(0), other.get(0));
			Line l2 = new Line(us.get(1), other.get(1));
			Line l3 = new Line(us.get(0), other.get(1));
			Line l4 = new Line(us.get(1), other.get(0));
			
			if (l1.areParallel(l2) && l3.areParallel(l4)&& l1.perpendicular(us.get(0)).areSame(l3))
				return true;
			
		}
		return false;
	}

	private void show(List<Point> square) {
		for (int i = 0; i < square.size(); i++)
			if (i == 0) {
				out.print(square.get(i).index);
			} else {
				out.print(" " + square.get(i).index);
			}
		out.println();
	}

	class Line implements Comparable<Line> {

		// ax+by+c==0
		// siempre a o b es 1
		double EPS = 1e-9;
		double a;
		double b;
		double c;
		double angle;

		private Line() {
		}

		public Line(Point p1, Point p2) {
			if (Math.abs(p1.x - p2.x) < EPS) {
				this.a = 1;
				this.b = 0;
				this.c = -p1.x;
			} else {
				this.a = -(p1.y - p2.y) / (p1.x - p2.x);
				this.b = 1;
				this.c = -(p1.x * a + p1.y);
			}
			this.angle = angle();
		}

		boolean areParallel(Line other) {
			return (Math.abs(a - other.a) < EPS)
					&& (Math.abs(b - other.b) < EPS);
		}

		boolean areSame(Line other) {
			return (areParallel(other) && Math.abs(c - other.c) < EPS);
		}

		Line parallel(Point p) {
			Line ret = new Line();
			ret.a = a;
			ret.b = b;
			ret.c = -(a * p.x + b * p.y);
			return ret;
		}

		Line perpendicular(Point p) {
			Line ret = new Line();
			if (Math.abs(a) > EPS) {
				ret.a = -b / a;
				ret.b = 1;
			} else {
				ret.a = 1;
				ret.b = 0;
			}

			ret.c = 0;
			return ret.parallel(p);
		}

		public double angle() {
			return Math.atan2(-a, b);
		}

		@Override
		public int compareTo(Line o) {
			if (o.angle - angle > EPS)
				return -1;
			if (angle - o.angle > EPS)
				return 1;
			if (o.c - c < EPS)
				return -1;
			if (c - o.c > EPS)
				return 1;
			return 0;
		}

	}

	public class Point implements Comparable<Point> {
		double EPS = 1e-9;
		double x, y;
		int index;

		Point(double x, double y, int index) {
			this.x = x;
			this.y = y;
			this.index = index;
		}

		public double dist(Point p) {
			return Math.hypot(x-p.x, y-p.y);
		}

		public boolean areSame(Point other) {
			if (this == other)
				return true;
			return Math.abs(x - other.x) < EPS && Math.abs(y - other.y) < EPS;
		}

		@Override
		public int compareTo(Point o) {
			if (Math.abs(x - o.x) > EPS)
				return Double.compare(x, o.x);
			if (Math.abs(y - o.y) > EPS)
				return Double.compare(y, o.y);
			return 0;
		}

		@Override
		public String toString() {
			return "Point [x=" + x + ", y=" + y + "]";
		}
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer strTok = new StringTokenizer("");

	String nextToken() throws IOException {
		while (!strTok.hasMoreTokens())
			strTok = new StringTokenizer(in.readLine());
		return strTok.nextToken();
	}

	int ni() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nl() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nd() throws IOException {
		return Double.parseDouble(nextToken());
	}

	int[] nia(int size) throws IOException {
		int[] ret = new int[size];
		for (int i = 0; i < size; i++)
			ret[i] = ni();
		return ret;
	}

	long[] nla(int size) throws IOException {
		long[] ret = new long[size];
		for (int i = 0; i < size; i++)
			ret[i] = nl();
		return ret;
	}

	double[] nda(int size) throws IOException {
		double[] ret = new double[size];
		for (int i = 0; i < size; i++)
			ret[i] = nd();
		return ret;
	}

	String nextLine() throws IOException {
		strTok = new StringTokenizer("");
		return in.readLine();
	}

	boolean EOF() throws IOException {
		while (!strTok.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null)
				return true;
			strTok = new StringTokenizer(s);
		}
		return false;
	}

	void printRepeat(String s, int count) {
		for (int i = 0; i < count; i++)
			out.print(s);
	}

	void printArray(int[] array) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0)
				out.print(' ');
			out.print(array[i]);
		}
		out.println();
	}

	void printArray(long[] array) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0)
				out.print(' ');
			out.print(array[i]);
		}
		out.println();
	}

	void printArray(double[] array) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0)
				out.print(' ');
			out.print(array[i]);
		}
		out.println();
	}

	void printArray(double[] array, String spec) {
		for (int i = 0; i < array.length; i++) {
			if (i > 0)
				out.print(' ');
			out.printf(Locale.US, spec, array[i]);
		}
		out.println();
	}

	void printArray(Object[] array) {
		boolean blank = false;
		for (Object x : array) {
			if (blank)
				out.print(' ');
			else
				blank = true;
			out.print(x);
		}
		out.println();
	}

	@SuppressWarnings("rawtypes")
	void printCollection(Collection collection) {
		boolean blank = false;
		for (Object x : collection) {
			if (blank)
				out.print(' ');
			else
				blank = true;
			out.print(x);
		}
		out.println();
	}

	static String memoryStatus() {
		return (Runtime.getRuntime().totalMemory()
				- Runtime.getRuntime().freeMemory() >> 20)
				+ "/" + (Runtime.getRuntime().totalMemory() >> 20) + " MB";
	}

	public void pln() {
		out.println();
	}

	public void pln(int arg) {
		out.println(arg);
	}

	public void pln(long arg) {
		out.println(arg);
	}

	public void pln(double arg) {
		out.println(arg);
	}

	public void pln(String arg) {
		out.println(arg);
	}

	public void pln(boolean arg) {
		out.println(arg);
	}

	public void pln(char arg) {
		out.println(arg);
	}

	public void pln(float arg) {
		out.println(arg);
	}

	public void pln(Object arg) {
		out.println(arg);
	}

	public void p(int arg) {
		out.print(arg);
	}

	public void p(long arg) {
		out.print(arg);
	}

	public void p(double arg) {
		out.print(arg);
	}

	public void p(String arg) {
		out.print(arg);
	}

	public void p(boolean arg) {
		out.print(arg);
	}

	public void p(char arg) {
		out.print(arg);
	}

	public void p(float arg) {
		out.print(arg);
	}

	public void p(Object arg) {
		out.print(arg);
	}

}