#include <bits/stdc++.h>
using namespace std;
long long ax, ay, bx, by, cx, cy;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> ax >> ay >> bx >> by >> cx >> cy;
  if ((by - ay) * (cx - bx) == (cy - by) * (bx - ax))
    cout << "NO\n";
  else if ((by - ay) * (by - ay) + (bx - ax) * (bx - ax) ==
           (by - cy) * (by - cy) + (bx - cx) * (bx - cx))
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
