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
'''input
7 10 12
5 6
20 23
15 4
16 5
4 54
12 1
4 15

'''

n, x, y = map(int, input().split())

g_x, g_y, l_x, l_y = 0, 0, 0, 0

for i in range(n):
    a, b = map(int, input().split())
    if a > x:
        g_x += 1
    if a < x:
        l_x += 1
    if b > y:
        g_y += 1
    if b < y:
        l_y += 1

# print(g_x, l_x, g_y, l_y)


ans = max(g_x, l_x, g_y, l_y)
print(ans)
if ans == g_x:
    print(x + 1, y)
elif ans == l_x:
    print(x - 1, y)
elif ans == g_y:
    print(x, y + 1)
else:
    print(x, y - 1)
