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,sx,sy=[int(i) for i in input().split(' ')]
z=[0,0,0,0]
for i in range(n):
    x,y=input().split(" ")
    x=int(x)
    y=int(y)
    if y<sy:
        z[0]+=1
    if x<sx:
        z[1]+=1
    if y>sy:
        z[2]+=1
    if x>sx:
        z[3]+=1
numb=max(z)
pos=z.index(max(z))
print(numb)
if pos==0:
    print(str(sx)+' '+str(sy-1))
elif pos==1:
    print(str(sx-1)+' '+str(sy))
elif pos==2:
    print(str(sx)+' '+str(sy+1))
else:
    print(str(sx+1)+' '+str(sy))