human
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 .

In the second sample test, you can't find any solution.
Using python3 can you solve the prior task?

Can you provide a Python code to 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?
assistant
#Here is Python code to 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.

# url: https://codeforces.com/contest/851/problem/b
# tag:
# difficulty:
from typing import List

INF = float("inf")
NINF = float("-inf")

def read_string():
    return input()

def read_string_line():
    return [x for x in input().split(" ")]

def read_int_line():
    return [int(x) for x in input().split(" ")]

def read_int():
    return int(input())

def get_int_arr(s):
    return [int(x) for x in s.split()]

def get_sum(acc, l, r):
    """
     l, r are original index
     """
    return acc[r] - acc[l]

P = int(1e9 + 7)

def exgcd(x, y):
    if y == 0:
        return x, 1, 0
    g, a, b = exgcd(y, x % y)
    t = x // y
    return g, b, a - t * b

def inv(x):
    g, a, b = exgcd(x, P)
    return a

def calc_acc(arr):
    ans = [0]
    for a in arr:
        ans.append(a + ans[-1])
    return ans

class Point:
    def __init__(self, x, y):
        self.x = x
        self.y = y

    def __sub__(self, other):
        return Point(self.x - other.x, self.y - other.y)

    def __add__(self, other):
        return Point(self.x + other.x, self.y + other.y)

    def __mul__(self, other):
        return Point(self.x * other, self.y * other)

    def dot(self, other):
        return self.x * other.x + self.y * other.y

    def cross(self, other):
        return self.x * other.y - self.y * other.x

    def abs(self):
        return self.abs2() ** 0.5

    def abs2(self):
        return self.dot(self)

    def dist(self, other):
        return (self - other).abs()

    def dist2(self, other):
        return (self - other).abs2()

    def __str__(self):
        return "Point(%s, %s)" % (self.x, self.y)

def get_point(line):
    x, y = get_int_arr(line)
    return Point(x, y)

lines: List[str] = [*open(0)]
ax, ay, bx, by, cx, cy = get_int_arr(lines[0])
a = Point(ax, ay)
b = Point(bx, by)
c = Point(cx, cy)
ok = (a - b).abs2() == (b - c).abs2() and (a + c - b * 2).abs() != 0

print("%s" % ("Yes" if ok else "No"))