#include <bits/stdc++.h>
using namespace std;
string mirror = "AHIMOTUVWXY";
string letter = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int main() {
  long long n, m, i, j, k, x, y, z, t;
  long long ax, bx, cx, ay, by, cy;
  cin >> ax >> ay >> bx >> by >> cx >> cy;
  long long ab = (ax - bx) * (ax - bx) + (ay - by) * (ay - by);
  long long bc = (bx - cx) * (bx - cx) + (by - cy) * (by - cy);
  if (ab == bc) {
    if ((by - ay) * (cx - ax) == ((bx - ax) * (cy - ay)))
      printf("NO\n");
    else
      printf("YES\n");
  } else {
    printf("NO\n");
  }
}
