/* -*- coding: utf-8 -*- * * 3180.cc: No.3180 angles sum - yukicoder */ #include #include #include using namespace std; /* constant */ const double DELTA = 1e-9; /* typedef */ /* global variables */ /* subroutines */ /* main */ int main() { int tn; scanf("%d", &tn); while (tn--) { double ax, ay, bx, by, cx, cy; scanf("%lf%lf%lf%lf%lf%lf", &ax, &ay, &bx, &by, &cx, &cy); double tha = atan2(ay, ax); double thb = atan2(by, bx); double thc = atan2(cy, cx); double d = abs(tha + thb - thc); //printf(" a+b=%.12lf, c=%.12lf, d=%.12lf\n", tha + thb, thc, d); if (abs(tha + thb - thc) < DELTA) puts("Yes"); else puts("No"); } return 0; }