N = int(input()) A = list(map(int, input().split())) S = [A[0] ** 2 + A[1] ** 2, A[2] ** 2 + A[3] ** 2, A[4] ** 2 + A[5] ** 2] dx = [A[0] - A[2], A[2] - A[4], A[4] - A[0]] dy = [A[1] - A[3], A[3] - A[5], A[5] - A[1]] P = dx[0] * dy[1] - dx[1] * dy[0] P *= 2 Qy = S[0] * dx[1] + S[1] * dx[2] + S[2] * dx[0] Qx = S[0] * dy[1] + S[1] * dy[2] + S[2] * dy[0] if P < 0 : P *= -1 Qx *= -1 Qy *= -1 R2 = (A[0] * P - Qx) ** 2 + (A[1] * P - Qy) ** 2 for _ in range(N) : x, y = map(int, input().split()) r2 = (x * P - Qx) ** 2 + (y * P - Qy) ** 2 print("Yes" if r2 <= R2 else "No")