#include <cstdio>
#include <complex>
using namespace std;

#define PI 3.14159265358979
#define EPS 10e-8

typedef complex<double> Point;

Point ps[4];

int main() {
  while (1) {
    for (int i=0; i<4; i++) {
      double x, y;
      if (scanf("%lf%lf", &x, &y) != 2) return 0;
      ps[i] = Point(x, y);
    }
  
    double theta = abs(arg((ps[0]-ps[1])/(ps[2]-ps[3])));
    printf("%f\n", theta);
    if (PI/2 - EPS < theta && theta < PI/2 + EPS) puts("YES");
    else puts("NO");
  }
}