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
n, sx, sy = map(int, stdin.readline().split())
neighbors = [(sx+1, sy), (sx, sy+1), (sx-1, sy), (sx, sy-1)]
scores = [0,0,0,0]
for i in range(n):
    x,y = map(int, stdin.readline().split())
    for i, (px,py) in enumerate(neighbors):
        if min(sx,x) <= px <= max(sx,x) and min(sy,y) <= py <= max(sy,y):
            scores[i] += 1

maxVal = 0
for i,score in enumerate(scores):
    if score > maxVal:
        maxVal = score
        ans = neighbors[i]

#print(neighbors)
print(maxVal)
print(ans[0], ans[1])


