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;
template <class T>
T min(T a, T b, T c) {
  return min(a, min(b, c));
}
template <class T>
T min(T a, T b, T c, T d) {
  return min(a, min(b, min(c, d)));
}
template <class T>
T max(T a, T b, T c) {
  return max(a, max(b, c));
}
template <class T>
T max(T a, T b, T c, T d) {
  return max(a, max(b, max(c, d)));
}
bool cmp(const pair<int, int>& a, const pair<int, int>& b) {
  return (a.first > b.first || (a.first == b.first && a.second >= b.second));
}
long long GCD(long long a, long long b) { return (a % b) ? GCD(b, a % b) : b; }
const string namePro = "tmp";
string To_string(long long x) {
  if (!x) return "0";
  string str = "";
  while (x) {
    str += x % 10 + '0';
    x /= 10;
  }
  reverse(str.begin(), str.end());
  return str;
}
string mul(string a, string b) {
  string res = "";
  bool isNegative =
      ((a[0] == '-' && b[0] != '-') || (a[0] != '-' && b[0] == '-'));
  if (a[0] == '-') a.erase(0, 1);
  if (b[0] == '-') b.erase(0, 1);
  int n = a.size();
  int m = b.size();
  int len = n + m;
  int carry = 0;
  for (int i = (len - 1); i >= (0); --i) {
    int tmp = 0;
    for (int j = (n - 1); j >= (0); --j) {
      if (i - j <= m && i - j >= 1) {
        int a1 = a[j] - '0';
        int b1 = b[i - j - 1] - '0';
        tmp += a1 * b1;
      }
    }
    tmp += carry;
    carry = tmp / 10;
    res += (char)(tmp % 10 + '0');
  }
  reverse(res.begin(), res.end());
  while (res.size() > 1 && res[0] == '0') res.erase(0, 1);
  if (isNegative) res = "-" + res;
  return res;
}
int main() {
  long long a_x, a_y, b_x, b_y, c_x, c_y;
  scanf("%lld%lld %lld%lld %lld%lld", &a_x, &a_y, &b_x, &b_y, &c_x, &c_y);
  long long a = (b_x - c_x) * (b_x - c_x) + (b_y - c_y) * (b_y - c_y);
  long long b = (a_x - c_x) * (a_x - c_x) + (a_y - c_y) * (a_y - c_y);
  long long c = (a_x - b_x) * (a_x - b_x) + (a_y - b_y) * (a_y - b_y);
  vector<long long> vc;
  double eps = 1e-9;
  vc.push_back(a);
  vc.push_back(b);
  vc.push_back(c);
  sort(vc.rbegin(), vc.rend());
  long long delta = vc[0] - vc[1] - vc[2];
  string res1 = mul("4", mul(To_string(vc[2]), To_string(vc[1])));
  string res2 = mul(To_string(delta), To_string(delta));
  if ((res1.size() < res2.size()) ||
      (res1.size() == res2.size() && res1 <= res2)) {
    puts("No");
    return 0;
  }
  if (a == c)
    puts("Yes");
  else
    puts("No");
  return 0;
}