#include <bits/stdc++.h>
using namespace std;
void fast() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  fast();
  long double a1, a2, b2, b1, c2, c1;
  cin >> a1 >> a2 >> b1 >> b2 >> c1 >> c2;
  ;
  long double x = (pow((a1 - b1), 2)) + (pow((a2 - b2), 2));
  long double z = (pow((b1 - c1), 2)) + (pow((b2 - c2), 2));
  if (z == x) {
    if (a1 + c1 != 2 * b1 || a2 + c2 != 2 * b2)
      cout << "YES";
    else
      cout << "NO";
  } else
    cout << "NO";
}
