#include <bits/stdc++.h>
using namespace std;
int main() {
  double x1, y1, x2, y2, x3, y3;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
  long long a = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
  long long b = (x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3);
  long long c = (x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2);
  bool p = 0;
  if ((x1 * y2 - x2 * y1 + x2 * y3 - x3 * y2 + x3 * y1 - x1 * y3) != 0) {
    if (a == c) p = 1;
  }
  if (p)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
