def minimum_bounding_circle(p1, p2, p3): def dist(q1, q2): x1, y1 = q1 x2, y2 = q2 return (x1 - x2) ** 2 + (y1 - y2) ** 2 def add(q1, q2): x1, y1 = q1 x2, y2 = q2 return (x1 + x2, y1 + y2) def mul(a, q1): x1, y1 = q1 return (a * x1, a * y1) A = dist(p2, p3) B = dist(p3, p1) C = dist(p1, p2) sa, sb, sc = sorted([A, B, C]) if sa + sb <= sc + 1e-7: c = add(p2, p3) if A == sc else add(p1, p3) if B == sc else add(p1, p2) c = mul(1/2, c) r2 = sc / 4 else: T = A * (B + C - A) U = B * (C + A - B) W = C * (A + B - C) c = mul(1 / (T + U + W), add(add(mul(T, p1), mul(U, p2)), mul(W, p3))) r2 = dist(c, p1) return c, r2 def main(): Q = int(input()) Xa, Ya, Xb, Yb, Xc, Yc = map(int, input().split()) (cx, cy), r = minimum_bounding_circle((Xa, Ya), (Xb, Yb), (Xc, Yc)) def dist(q1, q2): x1, y1 = q1 x2, y2 = q2 return (x1 - x2) ** 2 + (y1 - y2) ** 2 for _ in range(Q): xq, yq = map(int, input().split()) d = dist((xq, yq), (cx, cy)) if d <= r + 1e-3: print("Yes") else: print("No") return 0 main()