#include<iostream>
using namespace std;

int main(){

  double xa,ya,xb,yb,xc,yc,xd,yd;

  while(cin >> xa >> ya >> xb >> yb >> xc >> yc >> xd >> yd){

    if((xa - xb) / (ya - yb) == (yd - yc) / (xd - xc) || (xa - xb) / (ya - yb) == -((yd - yc) / (xd - xc))) cout << "YES" << endl;
    else cout << "NO" << endl;

    cout << (xa - xb) / (ya - yb) << endl;
    cout << (yd - yc) / (xd - xc) << endl;

    cout << endl << endl << endl;

  }
}