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
import sys
input = sys.stdin.readline

n,sx,sy = (int(x) for x in input().split())
east = 0
west = 0
south = 0
north = 0
for i in range(n):
    x,y = (int(x) for x in input().split())
    if x < sx:
        if y > sy:
            north += 1
            west += 1
        elif y < sy:
            south += 1
            west += 1
        else:
            west += 1
    elif x > sx:
        if y > sy:
            north += 1
            east += 1
        elif y < sy:
            south += 1
            east += 1
        else:
            east += 1
    else:
        if y > sy:
            north += 1
        elif y < sy:
            south += 1
print(max([east,west,south,north]))
if east >= max([west,south,north]):
    print(sx+1,sy)
elif west >= max([east,south,north]):
    print(sx-1,sy)
elif south >= max([east,west,north]):
    print(sx,sy-1)
else:
    print(sx,sy+1)