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 = map(int, input().split(' '))
ans = [0, 0, 0, 0]
for i in range(n):
    a, b = map(int, input().split(' '))
    if a < sx:
        ans[0] += 1
    if sx < a:
        ans[1] += 1
    if sy < b:
        ans[2] += 1
    if b < sy:
        ans[3] += 1
if ans[0] == max(ans):
    print(str(ans[0]))
    print(str(sx - 1) + ' ' + str(sy))
elif ans[1] == max(ans):
    print(str(ans[1]))
    print(str(sx + 1) + ' ' + str(sy))
elif ans[2] == max(ans):
    print(str(ans[2]))
    print(str(sx) + ' ' + str(sy + 1))
elif ans[3] == max(ans):
    print(str(ans[3]))
    print(str(sx) + ' ' + str(sy - 1))
