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())
L=[0,0,0,0]
for i in ' '*n:
    a,b=map(int,input().split())
    if a-sx>0:L[0]+=1
    if a-sx<0:L[1]+=1
    if b-sy>0:L[2]+=1
    if b-sy<0:L[3]+=1
m=0
mval=0
for i in range(4):
    if L[i]>mval:
        m=i
        mval=L[i]
print(mval)
dir=[[1,0],[-1,0],[0,1],[0,-1]]
print(sx+dir[m][0],sy+dir[m][1])