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,x,y=map(int,input().split())
ax,ay=[],[]
up,down,l,r=[0]*4
mx=0
for i in range(n):
    nx,ny=map(int,input().split())
    if ny>y:
        up+=1
    if nx>x:
        r+=1
    if nx<x:
        l+=1
    if ny<y:
        down+=1
    mx=max(mx,down)
    mx=max(mx,up)
    mx=max(mx,l)
    mx=max(mx,r)
print(mx)
if mx==down:
    print(x,y-1)
elif mx==up:
    print(x,y+1)
elif mx==l:
    print(x-1,y)
else:
    print(x+1,y)
        
    
    
