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 = map(int, input().split())
living = []
for i in range(n):
    living.append(list(map(int, input().split())))


east = 0
for i in range(n):
    if living[i][0] > sx:
        east += 1

west = 0
for i in range(n):
    if living[i][0] < sx:
        west += 1

north = 0
for i in range(n):
    if living[i][1] > sy:
        north += 1

south = 0
for i in range(n):
    if living[i][1] < sy:
        south += 1

maxi = max(east, west, north, south)

if maxi == east:
    print(east)
    print(sx+1, sy)
elif maxi == west:
    print(west)
    print(sx-1, sy)
elif maxi == north:
    print(north)
    print(sx, sy+1)
else:
    print(south)
    print(sx, sy-1)
