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
n,sx,sy=map(int,sys.stdin.readline().split())
left,right,up,down=0,0,0,0
for _ in range(n):
    u,v=map(int,sys.stdin.readline().split())
    if u<sx:
        left+=1
    if u>sx:
        right+=1
    if v<sy:
        down+=1
    if v>sy:
        up+=1
#print(left,right,up,down)
a=max(left,right,up,down)
if left==a:
    print(left)
    print(sx-1,sy)
elif right==a:
    print(right)
    print(sx+1,sy)
elif up==a:
    print(up)
    print(sx,sy+1)
elif down==a:
    print(down)
    print(sx,sy-1)
