for _ in range(int(input())): a, b, c, d, e, f = map(int, input().split()) x, y = a * c - b * d, a * d + b * c x, y = x * e + y * f, -x * f + y * e print('Yes' if x > 0 and y == 0 else 'No')