import math def distance(x1, y1, x2, y2): return math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) def solve(): Q = int(input()) XA, YA, XB, YB, XC, YC = map(int, input().split()) luggage = [list(map(int, input().split())) for _ in range(Q)] x = (XA + XB + XC) / 3 y = (YA + YB + YC) / 3 r = max(distance(x, y, XA, YA), distance(x, y, XB, YB), distance(x, y, XC, YC)) for xi, yi in luggage: if distance(x, y, xi, yi) <= r: print("Yes") else: print("No") solve()