#include<cstdio>
#include<cmath>
#include<algorithm>

#define pow(a) ((a)*(a))

using namespace std;

int main(void){
    int n;
    while(scanf("%d", &n),n>0){
        double x[4]={0};
        double y[4]={0};

        for(int i = 0; i < 4; i++){
            scanf("%lf %lf",&x[i], &y[i]);
        }

        double a = ((x[0]-x[1])/(y[0]-y[1]));
        double b = ((x[2]-x[3])/(y[2]-y[3]));

        if(a==b)
            puts("YES");
        else
            puts("NO");

    }

    return 0;
}