#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>
#include <fstream>
#include <bitset>
   
using namespace std;
   
 
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define foreach(it, c) for (__typeof__((c).begin()) it=(c).begin(); it != (c).end(); ++it)
#define rforeach(it, c) for (__typeof__((c).rbegin()) it=(c).rbegin(); it != (c).rend(); ++it)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define CL(arr, val) memset(arr, val, sizeof(arr))
#define COPY(dest, src) memcpy(dest, src, sizeof(dest))
#define ten(n) ((long long)(1e##n))
#define bin(n) (1LL << (n))
#define erep(i, n) for (int i = 0; i <= (int)(n); ++i)
#define revrep(i, n) for (int i = (n); i >= 0; --i)
#define pb push_back

template <class T> void chmax(T& a, const T& b) { a = max(a, b); }
template <class T> void chmin(T& a, const T& b) { a = min(a, b); }

template <class T> void uniq(T& c) { sort(c.begin(), c.end()); c.erase(unique(c.begin(), c.end()), c.end()); }
 
template <class T> string to_s(const T& a) { ostringstream os; os << a; return os.str(); }
template <class T> T to_T(const string& s) { istringstream is(s); T res; is >> res; return res; }

template <typename T> void print_container(ostream& os, const T& c) { const char* _s = " "; if (!c.empty()) { __typeof__(c.begin()) last = --c.end(); foreach (it, c) { os << *it; if (it != last) cout << _s; } } }
template <typename T> ostream& operator<<(ostream& os, const vector<T>& c) { print_container(os, c); return os; }
template <typename T> ostream& operator<<(ostream& os, const set<T>& c) { print_container(os, c); return os; }
template <typename T> ostream& operator<<(ostream& os, const multiset<T>& c) { print_container(os, c); return os; }
template <typename T> ostream& operator<<(ostream& os, const deque<T>& c) { print_container(os, c); return os; }
template <typename T, typename U> ostream& operator<<(ostream& os, const map<T, U>& c) { print_container(os, c); return os; }
template <typename T, typename U> ostream& operator<<(ostream& os, const pair<T, U>& p) { os << "( " << p.first << ", " << p.second << " )"; return os; }

template <class T> void print(T a, int n, const string& deli = " ", int br = 1) { for (int i = 0; i < n; ++i) { cout << a[i]; if (i + 1 != n) cout << deli; } while (br--) cout << endl; }
template <class T> void print2d(T a, int w, int h, int width = -1, int br = 1) { for (int i = 0; i < h; ++i) { for (int j = 0; j < w; ++j) {    if (width != -1) cout.width(width); cout << a[i][j] << ' '; } cout << endl; } while (br--) cout << endl; }

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }

void fix_pre(int n) { cout.setf(ios::fixed, ios::floatfield); cout.precision(10); }
void fast_io() { cin.tie(0); ios::sync_with_stdio(false); }
#define trace(x) (cout << #x << ": " << (x) << endl)
 
bool in_rect(int x, int y, int w, int h) { return 0 <= x && x < w && 0 <= y && y < h; }
bool in_seg(int n, int l, int r) { return l <= n && n < r; } // n in [l, r)?

typedef long long ll;
typedef pair<int, int> pint;

// y(v): v>^<  y(^): ^>v<
const int dx[] = { 0, 1, 0, -1 };
const int dy[] = { 1, 0, -1, 0 };

const double PI = acos(-1.0);
#define mp make_pair



/////////////////////////////////////////////
typedef double gtype;
const gtype EPS_FOR_LIB = 1e-9;
typedef complex<gtype> Point;
namespace std
{
	bool operator<(const Point& a, const Point& b)
	{
		return a.real() != b.real() ? a.real() < b.real() : a.imag() < b.imag();
	}
	std::istream& operator>>(std::istream& is, Point& p)
	{
		gtype a, b;
        is >> a >> b;
		p = Point(a, b);
		return is;
	}
	std::ostream& operator<<(std::ostream& os, Point& p)
	{
		return os << "(" << p.real() << ", " << p.imag() << ")";
	}
};
struct Line
{
	Point a, b;
	Line() {}
    Line(const Point& a, const Point& b)
        : a(a), b(b)
    {
        // 距離で割るときにNaNになるのを防ぐ
        if (a == b)
            this->b.real() += 1e-12;
    }
};
struct Circle
{
    Point p;
    gtype r;
    Circle() {}
    Circle(const Point& p, gtype r)
        : p(p), r(r)
    {
    }
};
ostream& operator<<(ostream& os, Circle& c)
{
    return os << "(" << c.p << ", " << c.r << ")";
}
typedef vector<Point> Poly;
// struct Poly : public vector<Point>
// {
//     Poly() {}
//     Poly(int n)
//     {
//         resize(n);
//     }
// };


gtype dot(const Point& a, const Point& b)
{
	return a.real() * b.real() + a.imag() * b.imag();
}
gtype cross(const Point& a, const Point& b)
{
	return a.real() * b.imag() - a.imag() * b.real();
}

enum res_ccw
{
	counter_clockwise = +1,
	clockwise = -1,
	on = 0,
};
res_ccw ccw(const Point& a, const Point& b, const Point& c)
{
	Point p = b - a, q = c - a;
	if (cross(p, q) > EPS_FOR_LIB) return counter_clockwise;
	else if (cross(p, q) < -EPS_FOR_LIB) return clockwise;
	return on;
}


//// 交差判定

// 直交判定
bool is_orthogonal(const Line& line1, const Line& line2)
{
	return abs(dot(line1.b - line1.a, line2.b - line2.a)) < 1e-9;
}
bool is_parallel(const Line& line1, const Line& line2)
{
	return abs(cross(line1.b - line1.a, line2.b - line2.a)) < 1e-9;
}

bool is_on_line(const Line& line, const Point& p)
{
	return abs(cross(line.b - line.a, p - line.a)) < 1e-20;
}
bool is_on_seg(const Line& seg, const Point& p)
{
	return abs(seg.a - p) + abs(p - seg.b) < abs(seg.a - seg.b) + EPS_FOR_LIB;
}


bool intersect_LL(const Line& line1, const Line& line2)
{
	return !is_parallel(line1, line2);
}
bool intersect_LS(const Line& line, const Line& seg)
{
	return cross(line.b - line.a, seg.a - line.a)
		* cross(line.b - line.a, seg.b - line.a) < EPS_FOR_LIB;
}
bool intersect_SS(const Line& seg1, const Line& seg2)
{
	return (cross(seg1.b - seg1.a, seg2.a - seg1.a) * cross(seg1.b - seg1.a, seg2.b - seg1.a) < -EPS_FOR_LIB
            && cross(seg2.b - seg2.a, seg1.a - seg2.a) * cross(seg2.b - seg2.a, seg1.b - seg2.a) < -EPS_FOR_LIB)
		|| is_on_seg(seg1, seg2.a)
		|| is_on_seg(seg1, seg2.b)
		|| is_on_seg(seg2, seg1.a)
		|| is_on_seg(seg2, seg1.b);
}



//// 距離
gtype dist_LP(const Line& line, const Point& p)
{
	return abs(cross(line.a - line.b, p - line.b) / abs(line.a - line.b));
}
gtype dist_PL(const Point& p, const Line& line)
{
    return dist_LP(line, p);
}
gtype dist_LL(const Line& line1, const Line& line2)
{
	return is_parallel(line1, line2) ? dist_LP(line1, line2.a) : 0;
}
gtype dist_LS(const Line& line, const Line& seg)
{
	if (intersect_LS(line, seg))
		return 0;
	else
		return min(dist_LP(line, seg.a), dist_LP(line, seg.b));
}
gtype dist_SL(const Line& seg, const Line& line)
{
    return dist_LS(line, seg); // 写すとき注意！！！
}
gtype dist_SP(const Line& seg, const Point& p)
{
	if (dot(seg.b - seg.a, p - seg.a) < 0)
		return abs(seg.a - p);
	else if (dot(seg.a - seg.b, p - seg.b) < 0)
		return abs(seg.b - p);
	else
		return dist_LP(seg, p);
}
gtype dist_PS(const Point& p, const Line& seg)
{
    return dist_SP(seg, p);
}
gtype dist_SS(const Line& seg1, const Line& seg2)
{
	if (intersect_SS(seg1, seg2))
		return 0;
	else
		return min(min(dist_SP(seg1, seg2.a), dist_SP(seg1, seg2.b))
			, min(dist_SP(seg2, seg1.a), dist_SP(seg2, seg1.b)));
}

Point cross_point_SS(const Line& seg1, const Line& seg2)
{
	if (!intersect_SS(seg1, seg2))
	{
		cerr << "cross_point_SS: 前提条件満たしてない" << endl;
		exit(1);
	}

	gtype a = abs(cross(seg1.b - seg1.a, seg2.a - seg1.a));
	gtype b = abs(cross(seg1.b - seg1.a, seg2.b - seg1.a));

	gtype t = a / (a + b);
	return seg2.a + t * (seg2.b - seg2.a);
}
Point cross_point_LL(const Line& line1, const Line& line2)
{
	if (is_parallel(line1, line2))
	{
		cerr << "cross_point_LL: 前提条件満たしてない" << endl;
		exit(1);
	}

	Point a = line1.b - line1.a, b = line2.b - line2.a;
	gtype p = cross(b, line2.a - line1.a);
	gtype q = cross(b, a);
	return line1.a + p / q * a;
}

// 回転
Point rotate(const Point& p, gtype angle)
{
	gtype c = cos(angle), s = sin(angle);
	return Point(p.real() * c - p.imag() * s, p.real() * s + p.imag() * c);
}
Point rotate(const Point& p, gtype angle, const Point& base)
{
	Point t = p - base;
	return rotate(t, angle) + base;
}

// 点から直線に垂線を下ろした点
Point projection(const Line& line, const Point& p)
{
	Point a = line.a - line.b;
	gtype t = dot(p - line.a, a) / norm(a);
	return line.a + t * a;
}

// 線対称な点
Point reflection(const Line& line, const Point& p)
{
	return p + ((gtype)2) * (projection(line, p) - p);
}


// 長方形
struct Rect
{
	Point low, high;
	Rect(Point low, Point high)
		: low(low), high(high) { }
	Rect() { }

	gtype x1() const { return low.real(); }
	gtype x2() const { return high.real(); }
	gtype y1() const { return low.imag(); }
	gtype y2() const { return high.imag(); }

    Point top_left() const { return Point(x1(), y2()); }
    Point bottom_left() const { return Point(x1(), y1()); }
    Point bottom_right() const { return Point(x2(), y1()); }
    Point top_right() const { return Point(x2(), y2()); }

    Poly to_poly() const
    {
        Poly res;
        res.push_back(top_left());
        res.push_back(bottom_left());
        res.push_back(bottom_right());
        res.push_back(top_right());
        return res;
    }
};
// 境界交差はfalse
bool intersect_rect_area(const Rect& a, const Rect& b)
{
	bool x = a.low.real() < b.high.real() && a.high.real() > b.low.real();
	bool y = a.low.imag() < b.high.imag() && a.high.imag() > b.low.imag();
	return x && y;
}
// allow segment
bool intersect_rect(const Rect& a, const Rect& b)
{
	bool x = !(a.low.real() > b.high.real()) && !(a.high.real() < b.low.real());
	bool y = !(a.low.imag() > b.high.imag()) && !(a.high.imag() < b.low.imag());
	return x && y;
}
vector<Point> corner(const Rect& r)
{
	gtype x[] = { r.low.real(), r.high.real() };
	gtype y[] = { r.low.imag(), r.high.imag() };
	vector<Point> res;
	for (int i = 0; i < 2; ++i)
		for (int j = 0; j < 2; ++j)
			res.push_back(Point(x[i], y[j]));
	return res;
}


// 凸包
bool allow_line(res_ccw r) { return r < 0; }
bool strict(res_ccw r) { return r <= 0; }
Poly convex_hull(vector<Point> ps, bool f(res_ccw))
{
    sort(ps.begin(), ps.end());
    ps.erase(unique(ps.begin(), ps.end()), ps.end());

    int n = ps.size(), k = 0;
    Poly res;
    res.resize(2 * n);
    for (int i = 0; i < n; ++i)
    {
        while (k >= 2 && f(ccw(res[k - 2], res[k - 1], ps[i])))
            --k;
        res[k++] = ps[i];
    }
    for (int i = n - 2, t = k + 1; i >= 0; --i)
    {
        while (k >= t && f(ccw(res[k - 2], res[k - 1], ps[i])))
            --k;
        res[k++] = ps[i];
    }
    res.resize(k - 1);
    return res;
}

// 凸包判定
// AOJ0035
bool is_convex(const Poly& p)
{
    for (int i = 0; i < (int)p.size(); ++i)
    {
        if (ccw(p[(i - 1 + p.size()) % p.size()], p[i], p[(i + 1) % p.size()]) > 0)
            return false;
    }
    return true;
}

// not verified
gtype area(const Poly& p)
{
	gtype s = 0;
	for (int i = 0; i < (int)p.size(); ++i)
		s += cross(p[i], p[(i + 1) % p.size()]);
	return abs(s / 2);
}

// verify: AOJ0012
enum res_contain{ IN, ON, OUT };
res_contain contain(const Poly& poly, const Point& p)
{
	bool in = false;
	for (int i = 0; i < (int)poly.size(); ++i)
	{
		Point a = poly[i] - p, b = poly[(i + 1) % poly.size()] - p;
		if (a.imag() > b.imag())
			swap(a, b);
		if ((a.imag() <= 0 && 0 < b.imag()) && cross(a, b) < 0)
			in = !in;
		if (is_on_seg(Line(poly[i], poly[(i + 1) % poly.size()]), p))
			return ON;
	}
	return in ? IN : OUT;
}


// 円
enum res_circle_rela
{
    a_in_b,
    b_in_a,

    tangent,
    intersect,
    not_intersect,
};
// verify: AOJ0023(feps = 0)
res_circle_rela circle_rela(const Circle& a, const Circle& b)
{
    const gtype feps = 0;
    gtype d = abs(a.p - b.p);
    if (d + feps > a.r + b.r)
        return not_intersect;
    else
    {
        if (d + feps < a.r - b.r)
            return b_in_a;
        else if (d + feps < b.r - a.r)
            return a_in_b;
        else
            return intersect;
    }
}
vector<Point> intersect_points(const Circle& a, const Circle& b)
{
    Point ab = b.p - a.p;
    Point c = a.p + ab * (a.r / (a.r + b.r));

    gtype dis = abs(a.p - c);
    if (dis > a.r)
        return vector<Point>();
    gtype h = sqrt(max<gtype>(0, a.r*a.r - dis*dis));

    Point u = ab * Point(0, 1) / abs(ab);
    Point v = ab * Point(0, -1) / abs(ab);

    Point p = c + u * h;
    Point q = c + v * h;

    vector<Point> res;
    res.push_back(p);
    if (abs(p - q) > 1e-9)
        res.push_back(q); // 2点で交わっている

    return res;
}

bool intersect_poly_circle(const Poly& poly, const Circle& c)
{
    for (int i = 0; i < (int)poly.size(); ++i)
        if (dist_SP(Line(poly[i], poly[(i + 1) % poly.size()]), c.p) < c.r + 1e-9)
            return true;
    return contain(poly, c.p) == IN;
}


string replace(const string& str, const string& from, const string& to)
{
    string res = str;
    string::size_type p;
    while ((p = res.find(from)) != string::npos)
        res.replace(p, from.size(), to);
    return res;
}
int main()
{
    int T;
    cin >> T;
    while (T--)
    {
        Point p[4];
        rep(i, 4)
            cin >> p[i];
        Line a(p[0], p[1]), b(p[2], p[3]);
        cout << (is_parallel(a, b) ? "YES" : "NO") << endl;
    }
}

Measured memory_bytes: 1232