#include <bits/stdc++.h>
using namespace std;

int main()
{
	int n;
	double x[4], y[4];

	while (cin >> n, n){
		for (int i = 0; i < 4; i++){
			cin >> x[i] >> y[i];
		}

		double abx = fabs(x[0] - x[1]), cdx = fabs(x[2] - x[3]);
		double aby = y[0] - y[1], cdy = y[2] - y[3];

		if (aby / abx == cdy / cdx){
		   cout << "YES" << endl;
		}

		else {
			cout << "NO" << endl;
		}
	}
	return (0);
}