1 1000000000 7
1000000000 9
 3 2 2
2 4
2 1
3 6
 2 1000000000 100000
1000000000 1000000
1000000000 10000
 1 100 100
50 70
 1 100 100
101 100

1
1000000000 8 2
2 3 1
1000000000 100001 1
99 100 1
101 100
n, Sx, Sy = list(map(int, input().split()))
student_houses = [tuple(map(int, input().split())) for _ in range(n)]
from collections import defaultdict

students_SP = defaultdict(int)
neighbouring_coords = [(0, 1), (1, 0), (-1, 0), (0, -1)]
neighbouring_S = [(Sx + coord[0], Sy +coord[1]) for coord in neighbouring_coords]

for student_house in student_houses:
    Sx_b = Sx
    Sy_b = Sy
    xh = student_house[0]
    yh = student_house[1]
    if Sx_b > xh:
        Sx_b, xh = xh, Sx_b
    if Sy_b > yh:
        Sy_b, yh = yh, Sy_b

    for coord in neighbouring_S:
        if Sx_b <= coord[0] <= xh  and Sy_b <= coord[1] <= yh:
            students_SP[coord] += 1

sortedItems = sorted(students_SP.items(), key=lambda x: x[1], reverse=True)
print(sortedItems[0][1])
print(" ".join(map(str, sortedItems[0][0])))