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 MOD = 1e9 + 7;
const int MAXN = 1e6 + 9;
const int INF = 0x3f3f3f3f;
const double EPS = 1e-6;
inline int sgn(double x) {
  if (x < -EPS) return -1;
  return x > EPS;
}
inline int cmp(double x, double y) { return sgn(x - y); }
int n, m;
struct Point {
  double x, y;
  void read() { scanf("%lf%lf", &x, &y); }
  Point operator-(const Point p) const { return (Point){x - p.x, y - p.y}; }
  double len2() { return x * x + y * y; }
  double operator^(const Point p) const { return x * p.x + y * p.y; }
} p[5];
Point getp(double a1, double b1, double c1, double a2, double b2, double c2) {
  return (Point){(c1 * b2 - c2 * b1) / (a1 * b2 - a2 * b1),
                 (c1 * a2 - c2 * a1) / (a2 * b1 - a1 * b2)};
}
void solve() {
  if (cmp((p[1].x - p[2].x) * (p[3].y - p[2].y),
          (p[3].x - p[2].x) * (p[1].y - p[2].y)) == 0) {
    printf("No\n");
    return;
  }
  Point d = getp(p[2].x - p[1].x, p[2].y - p[1].y,
                 -((p[1].x * p[1].x - p[2].x * p[2].x) / 2 +
                   (p[1].y * p[1].y - p[2].y * p[2].y) / 2),
                 p[3].x - p[2].x, p[3].y - p[2].y,
                 -((p[2].x * p[2].x - p[3].x * p[3].x) / 2 +
                   (p[2].y * p[2].y - p[3].y * p[3].y) / 2));
  if (cmp(((p[1] - d) ^ (p[2] - d)), ((p[2] - d) ^ (p[3] - d))) == 0) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
}
void init() {
  for (int i = (int)(1); i <= (int)(3); i++) {
    p[i].read();
  }
}
int main() {
  int T = 1;
  while (T--) {
    init();
    solve();
  }
  return 0;
}