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, s_x, s_y = map(int, input().split())
S, E, W, N = 0, 0, 0, 0
for i in range(n):
    x, y = map(int, input().split())
    if y > s_y:
        N += 1
    elif y < s_y:
        S += 1
    if x > s_x:
        E += 1
    elif x < s_x:
        W += 1
if S == max(S, E, W, N):
    print(S)
    print(s_x, s_y - 1)
elif E == max(S, E, W, N):
    print(E)
    print(s_x + 1, s_y)
elif W == max(S, E, W, N):
    print(W)
    print(s_x - 1, s_y)
elif N == max(S, E, W, N):
    print(N)
    print(s_x, s_y + 1)
