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 long long INF = 1e18;
const long long MAXN = 1e6;
const long long POLTOS = 50;
const long long SOTKA = 100;
const long long P = 1e9 + 7;
const long double pi = 3.141592653589793238462643383279;
const long double eps = 1e-7;
const long double base = 1e9 + 7;
struct point {
  long long x, y;
};
struct vect {
  long long x, y;
};
struct line {
  long long a, b, c;
};
line get_line(point, point);
long double dot_product(vect, vect);
long double vec_len(vect);
vect get_vector(point, point);
long double angle(vect, vect);
long double cross_product(vect, vect);
long double dpline(point, line);
long double is_point_in_sector(point, point, point);
long double area_of_sector(long long, point[]);
long double vec_point_len(long double, long double, long double, long double);
bool is_point_in_line(point, line);
void w_arr(vector<long long>);
void w_matrix(vector<vector<long long> >);
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  point a, b, c;
  cin >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y;
  vect x = get_vector(a, b), y = get_vector(b, c);
  line n = get_line(a, c);
  cout << (vec_point_len(a.x, a.y, b.x, b.y) !=
                       vec_point_len(b.x, b.y, c.x, c.y) ||
                   ((c.x - b.x) * (b.y - a.y) == (c.y - b.y) * (b.x - a.x))
               ? "NO"
               : "YES");
  return 0;
}
bool is_point_in_line(point a, line n) {
  return n.a * a.x + n.b * a.y + n.c == 0;
}
long double area_tr(long double a, long double b, long double c) {
  long double p = (a + b + c) / 2;
  return sqrt(abs(p) * abs(p - a) * abs(p - b) * abs(p - c));
}
long double vec_point_len(long double a, long double a1, long double b,
                          long double b1) {
  return sqrt((a - b) * (a - b) + (a1 - b1) * (a1 - b1));
}
long double area_of_sector(long long n, point a[]) {
  long double sum = 0;
  for (long long i = 0; i < n; i++)
    sum += (a[i].y + a[i + 1].y) * (a[i + 1].x - a[i].x);
  return sum / 2;
}
line get_line(point a, point b) {
  line k;
  k.a = b.y - a.y;
  k.b = a.x - b.x;
  k.c = -k.a * a.x - k.b * a.y;
  return k;
}
long double dot_product(vect a, vect b) { return a.x * b.x + a.y * b.y; }
long double vec_len(vect v) { return sqrt(v.x * v.x + v.y * v.y); }
vect get_vector(point a, point b) {
  vect q;
  q.x = b.x - a.x;
  q.y = b.y - a.y;
  return q;
}
long double angle(vect v, vect vi) {
  return atan2(cross_product(v, vi), dot_product(v, vi));
}
long double cross_product(vect a, vect b) { return a.x * b.y - b.x * a.y; }
long double dpline(point p, line n) { return abs(n.a * p.x + n.b * p.y + n.c); }
long double is_point_in_sector(point p, point p1, point p2) {
  vect v, v1, v2, v3;
  line n = get_line(p1, p2);
  v = get_vector(p1, p);
  v1 = get_vector(p2, p);
  v2 = get_vector(p, p2);
  v3 = get_vector(p2, p1);
  if (dot_product(v, v2) >= 0 && dot_product(v1, v3) >= 0)
    return dpline(p, n);
  else if (dot_product(v1, v3) < 0)
    return vec_len(v1);
  else if (dot_product(v, v2))
    return vec_len(v);
}
void w_arr(vector<long long> f) {
  for (long long i = 0; i < f.size(); i++) cout << f[i] << ' ';
  cout << endl;
  return;
}
void w_matrix(vector<vector<long long> > f) {
  for (long long i = 0; i < f.size(); i++) {
    for (long long j = 0; j < f[i].size(); j++) cout << f[i][j] << ' ';
    cout << endl;
  }
  return;
}