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
from sys import stdin, stdout
input = stdin.readline
def inputnums():
    return(map(int,input().split()))
n, sx, sy = inputnums()
N = 0
S = 0
E = 0
W = 0
for i in range(n):
    l = [int(x) for x in input().split(' ')]
    if l[1] > sy:
        N += 1 
    elif l[1] < sy:
        S += 1
    if l[0] > sx:
        E += 1 
    elif l[0] < sx:
        W += 1 
mx = max([N, S, E, W])
print(mx)
if N == mx:
    print(sx, sy+1)
elif S == mx:
    print(sx, sy-1)
elif E == mx:
    print(sx+1, sy)
else:
    print(sx-1, sy)
