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())
xy = []

for i in range(n):
    xy.append(tuple(map(int, input().split())))
    
b = 0
a = 0
r = 0
l = 0

for i in xy:
    if i[0] < sx:
        l += 1
    elif i[0] > sx:
        r += 1
        
    if i[1] < sy:
        b += 1
    elif i[1] > sy:
        a += 1
        
if max(a, b, r, l) == r:
    print(r)
    print(sx+1, sy)
elif max(a, b, r, l) == l:
    print(l)
    print(sx-1, sy)
elif max(a, b, r, l) == a:
    print(a)
    print(sx, sy+1)
elif max(a, b, r, l) == b:
    print(b)
    print(sx, sy-1)