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 io,os
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
n,sx,sy=tuple(map(int,input().split()))
#l=[[0,0] for i in range(n)]
t1=0
t2=0
t3=0
t4=0
for i in range(n):
    x,y=tuple(map(int,input().split()))
    if(y>sy):
        t1+=1
    elif(y<sy):
        t2+=1
    if(x>sx):
        t3+=1
    elif(x<sx):
        t4+=1
#print(l)
t=max(t1,t2,t3,t4)
print(t)
if(t==t1):
    print(sx,sy+1)
elif(t==t2):
    print(sx,sy-1)
elif(t==t3):
    print(sx+1,sy)
else:
    print(sx-1,sy)