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

Solution:
#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7FFFFFFF;
struct prioritycom {
  bool operator()(const int& l, const int& r) { return l < r; }
};
template <typename T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
T bigmod(T n, T p, T m) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    T t = bigmod(n, p / 2, m);
    return (t * t) % m;
  }
  return (bigmod(n, p - 1, m) * n) % m;
}
template <class string>
long long int strton(string s) {
  long long int won;
  stringstream ss;
  ss << s;
  ss >> won;
  return won;
}
template <class T>
string ntostr(T n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
template <class T>
inline T mod(T n, T m) {
  return (n % m + m) % m;
}
template <class T>
bool isprime(T n) {
  if (n % 2 == 0) {
    if (n == 2)
      return true;
    else
      return false;
  }
  T m = sqrt(n);
  for (T i = 3; i <= m; i += 2) {
    if (n % i == 0) return false;
  }
  return true;
}
bool isvowel(char ch) {
  ch = toupper(ch);
  if (ch == 'A' || ch == 'U' || ch == 'I' || ch == 'O' || ch == 'E')
    return true;
  return false;
}
bool isconsonant(char ch) {
  if (isalpha(ch) && !isvowel(ch)) return true;
  return false;
}
struct {
  long long int x, y;
} pts[5];
bool sameline(long long int p, long long int q, long long int r) {
  return (pts[p].y - pts[q].y) * (pts[q].x - pts[r].x) ==
         (pts[q].y - pts[r].y) * (pts[p].x - pts[q].x);
}
int main() {
  scanf("%lld%lld%lld%lld%lld%lld", &pts[1].x, &pts[1].y, &pts[2].x, &pts[2].y,
        &pts[3].x, &pts[3].y);
  if (sameline(1, 2, 3))
    printf("No\n");
  else {
    if ((((pts[1].x - pts[2].x) * (pts[1].x - pts[2].x)) +
         ((pts[1].y - pts[2].y) * (pts[1].y - pts[2].y))) ==
        (((pts[2].x - pts[3].x) * (pts[2].x - pts[3].x)) +
         ((pts[2].y - pts[3].y) * (pts[2].y - pts[3].y))))
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}