Problem: Arpa is taking a geometry exam. Here is the last problem of the exam.

You are given three points a, b, c.

Find a point and an angle such that if we rotate the page around the point by the angle, the new position of a is the same as the old position of b, and the new position of b is the same as the old position of c.

Arpa is doubting if the problem has a solution or not (i.e. if there exists a point and an angle satisfying the condition). Help Arpa determine if the question has a solution or not.

Input

The only line contains six integers ax, ay, bx, by, cx, cy (|ax|, |ay|, |bx|, |by|, |cx|, |cy| ≤ 109). It's guaranteed that the points are distinct.

Output

Print "Yes" if the problem has a solution, "No" otherwise.

You can print each letter in any case (upper or lower).

Examples

Input

0 1 1 1 1 0


Output

Yes


Input

1 1 0 0 1000 1000


Output

No

Note

In the first sample test, rotate the page around (0.5, 0.5) by <image>.

In the second sample test, you can't find any solution.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;

public class b
{
	public static void main(String[] args)
	{
		FastScanner in = new FastScanner();
		Point points[] = new Point[3];
		
		for(int i = 0; i < 3; i++)
			points[i] = new Point(in.nextLong(), in.nextLong());
		
		double a1 = points[0].x;
		double b1 = points[1].x;
		double c1 = points[2].x;
		double a2 = points[0].y;
		double b2 = points[1].y;
		double c2 = points[2].y;
		
		long dist1 = points[0].dist(points[1]);
//		double dist2 = points[0].dist(points[2]);
		long dist3 = points[1].dist(points[2]);
		
//		System.out.println(dist1 + " " + dist3);
		double s1 = points[0].slope(points[1]);
		double s2 = points[0].slope(points[2]);
//		System.out.println(s1);
//		System.out.println(s2);
		
		if(s1 == s2)
			System.out.println("No");
		else if(dist1 == dist3)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
	
	private static boolean equals(double a, double b)
	{
//		System.out.println("Diff: " + Math.abs(b-a));
		return Math.abs(a-b) < 1e-9;
	}

	public static class Point
	{
		long x, y;
		
		public Point(long xx, long yy)
		{
			x = xx;
			y = yy;
		}
		
		public long dist(Point o)
		{
			long dx = x-o.x;
			long dy = y-o.y;
			return dx*dx+dy*dy;
		}
		
		public String toString()
		{
			return x + " " + y;
		}
		
		public double slope(Point o)
		{
			double dx = x-o.x;
			double dy = y-o.y;
			return dy/dx;
		}
	}
	
	public static class FastScanner
	{
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(String s)
		{
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		public FastScanner()
		{
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String nextToken()
		{
			while (st == null || !st.hasMoreElements())
			{
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

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

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

		double nextDouble()
		{
			return Double.parseDouble(nextToken());
		}
		
		String next()
		{
			return nextToken();
		}
	}
}