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

Solution:
import sys
delta = 10**(-14)
class Point:
    def __init__(self, x=None, y=None):
        self.x = x
        self.y = y

class Line:
    def __init__(self):
        self.isvertical = None
        self.x = None
        self.k = None
        self.b = None

ax, ay, bx, by, cx, cy = map(int, input().split())
a = Point(ax, ay)
b = Point(bx, by)
c = Point(cx, cy)

def line2points(p1, p2):
    result = Line()
    if(p1.x == p2.x):
        result.isvertical = True
        result.x = p1.x
        return result
    result.k = (p2.y - p1.y)/(p2.x - p1.x)
    result.b = p1.y - ((p1.x * (p2.y - p1.y))/(p2.x - p1.x))
    result.isvertical = False
    return result

def intersection(l1, l2):
    result = Point()
    if(l1.isvertical and l2.isvertical):
        return result
    if(l1.k == l2.k):
        return result
    if(l1.isvertical):
        result.x = l1.x
        result.y = l2.k * result.x + l2.b
        return result
    if(l2.isvertical):
        result.x = l2.x
        result.y = l1.k * result.x + l1.b
        return result
    result.x = (l2.b - l1.b)/(l1.k - l2.k)
    result.y = l1.k * result.x + l1.b
    return result

def d(p1, p2):
    return (p1.x - p2.x)**2 + (p1.y - p2.y)**2

def perline(l, p):
    result = Line()
    if(l.isvertical):
        result.isvertical = False
        result.k = 0
        result.b = p.y
        return result
    if(l.k == 0):
        result.isvertical = True
        result.x = p.x
        return result
    result.k = (-1)/l.k
    result.b = p.y - result.k * p.x
    return result

mab = Point((a.x + b.x)/2, (a.y + b.y)/2)
mbc = Point((b.x + c.x)/2, (b.y + c.y)/2)
ab = line2points(a, b)
bc = line2points(b, c)

perab = perline(ab, mab)
perbc = perline(bc, mbc)

inter = intersection(perab, perbc)
if(inter.x is None and inter.y is None):
    print("No")
    sys.exit()

dist = []
dist.append(d(inter, a))
dist.append(d(inter, b))
dist.append(d(inter, c))
dist = sorted(dist)
if(dist[-1] - dist[0] < delta and d(c,b) == d(a, b)):
    print("Yes")
else:
    print("No")