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
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

n,sx,sy = map(int, input().split())
s = [0,0,0,0]
for i in range(n):
    x,y = map(int, input().split())
    if x<sx:
        s[0] += 1
    elif sx<x:
        s[1] += 1
    if y<sy:
        s[2] += 1
    elif sy<y:
        s[3] += 1
s = [(s[i], i)for i in range(4)]
s.sort(key=lambda x: -x[0])
dxdy = [(-1,0),(1,0),(0,-1),(0,1)]
for i in range(4):
    ans, j = s[i]
    px,py = sx+dxdy[j][0], sy+dxdy[j][1]
    if 0<=px<=10**9 and 0<=py<=10**9:
        print(ans)
        print(px,py)
        exit()
