import math from decimal import Decimal, getcontext EPS = Decimal(1e-7) n = int(input()) points = list(map(Decimal, 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) r2 = (px - a) **2 + (py - b) ** 2 for i in range(n): x, y = list(map(Decimal, input().split())) if (x - px) * (x - px) + (y - py) * (y - py) - r2 < EPS: print("Yes") else: print("No")