#include <vector>
#include <cmath>
#include <iostream>
using namespace std;

int main(){
    int n;
    for (int i = 0; i < n; i++){
	double x[5];
	double y[5];
	
	for (int i = 1; i <= 4; i++) cin >> x[i] >> y[i];
	
	if (x[1] > x[2]){
	    swap(x[1], x[2]);
	    swap(y[1], y[2]);
	}
	if (x[3] > x[4]){
	    swap(x[3], x[4]);
	    swap(y[3], y[4]);
	}
	if ((x[2] - x[1]) / (y[2] - y[1]) == (x[4] - x[3]) / (y[4] - y[3]))
	    cout << "YES" << endl;
	else cout << "NO" << endl;
    }
}