#include<iostream>
#define rep(i,x) for(int i=0;i<x;i++)
using namespace std;
int main(){
    int n;
    while(n--){
        double a[4][2];
        rep(i,4)rep(j,2)cin>>a[i][j];
        double line1=(a[0][0]-a[1][0])/(a[0][1]-a[1][1]);
        double line2=(a[2][0]-a[3][0])/(a[2][1]-a[3][1]);
        if(line1!=line2)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
}