import math EPS = 1e-8 n = int(input()) points = list(map(float, input().split())) a = points[0] b = points[1] c = points[2] d = points[3] e = points[4] f = points[5] aa = a * a bb = b * b cc = c * c dd = d * d ee = e * e ff = f * f try: py = ((e - a) * (aa + bb - cc - dd) - (c - a) * (aa + bb - ee- ff)) / (2 * (e - a)*(b - d) - 2 * (c - a) * (b - f)) px = (2 * (b - f) * py - aa - bb + ee + ff) / (2 * (e - a)) \ if (c == a) else (2 * (b - d) * py - aa - bb + cc + dd) / (2 * (c - a)) except ZeroDivisionError: mx = min([a, c, e]) MX = max([a, c, e]) my = min([b, d, f]) MY = max([b, d, f]) px = (mx + MX) / 2 py = (my + MY) / 2 # print(px, py) r = math.hypot(px - a, py - b) for i in range(n): x, y = list(map(float, input().split())) if (x - px) * (x - px) + (y - py) * (y - py) - r * r < EPS: print("Yes") else: print("No")