#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int cases = 1;
  while (cases--) {
    long long int a, b, x, y, m, n;
    cin >> a >> b >> x >> y >> m >> n;
    long long int d1 = (a - x) * (a - x) + (b - y) * (b - y);
    long long int d2 = (x - m) * (x - m) + (y - n) * (y - n);
    long long int t1 = (n - b) * (x - a);
    long long int t2 = (m - a) * (y - b);
    if (d1 != d2 || t1 == t2) {
      cout << "NO\n";
    } else
      cout << "YES\n";
  }
  return 0;
}
