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
f = list(map(int,input().split()))
a = []
b = [0, 0, 0, 0]
for i in range(f[0]):
    a.append(list(map(int, input().split())))
for i in range(f[0]):
    if a[i][0] - f[1] > 0:
        b[0] += 1
    if a[i][0] - f[1] < 0:
        b[1] += 1
    if a[i][1] - f[2] > 0:
        b[2] += 1
    if a[i][1] - f[2] < 0:
        b[3] += 1
print(max(b))
if b[0]==max(b):
    print(f[1]+1, f[2])
elif b[1]==max(b):
    print(f[1]-1, f[2])
elif b[2]==max(b):
    print(f[1], f[2]+1)
elif b[3]==max(b):
    print(f[1], f[2]-1)