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 PYTHON):

Solution:
from __future__ import division
import math

EPS = 1e-9

def cross(ax, ay, bx, by):
    return ax * by - ay * bx

def getLineByVec(dx, dy, x, y):
    a = dy
    b = -dx
    c = a*x + b*y
    return Line(a,b,-c)

class Vector:
    def __init__(self, x, y):
        self.x = x
        self.y = y
        
    def __add__(self, vector):
        return Vector(self.x + vector.x, self.y + vector.y)
    
    def __sub__(self, vector):
        return Vector(self.x - vector.x, self.y - vector.y)
    
    def __mul__(self, operand):
        if isinstance(operand, int):
            return Vector(self.x * operand, self.y * operand)
        elif isinstance(operand, Vector):
            return self.x * operand.x + self.y * operand.y
    
    def __div__(self, scalar):
        return Vector(self.x / float(scalar), self.y / float(scalar))
        
    def getLength(self):
        return math.sqrt(self.x**2 + self.y**2)
    
    def normalize(self):
        return self / self.getLength()


class Line:
    def __init__(self, a, b, c):
        self.a = a
        self.b = b
        self.c = c
  
    def getIntersectionPoint(self, line):
        zn = cross(self.a, self.b, line.a, line.b)
        if abs(zn) < EPS:
            return None
        x = -cross(self.c, self.b, line.c, line.b) / zn
        y = -cross(self.a, self.c, line.a, line.c) / zn
        return Vector(x, y)


ax, ay, bx, by, cx, cy = map(int, raw_input().split())

A = Vector(ax, ay)
B = Vector(bx, by)
C = Vector(cx, cy)

AB = B - A
BC = C - B
CA = A - C

AL = Vector(-AB.y, AB.x)
BL = Vector(-BC.y, BC.x)
CL = Vector(-CA.y, CA.x)

Al = getLineByVec(AL.x, AL.y, (A.x+B.x)/2, (A.y+B.y)/2)
Bl = getLineByVec(BL.x, BL.y, (B.x+C.x)/2, (B.y+C.y)/2)

center = Al.getIntersectionPoint(Bl)
if center is not None and abs((center-B)*(center-A) - (center-C)*(center-B)) < EPS:
    print "Yes"
else:
    print "No"