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=[]
for i in range(n):
    l.append(list(map(int,input().split())))
mu=0
ms=0
hu=0
hs=0
m=0
h=0
u=0
s=0
sxsy=0
for i in range(n):
    if l[i][0]==sx and l[i][1]==sy:
        sxsy+=1
    elif l[i][0]==sx and l[i][1]<sy:
        s+=1
    elif l[i][0]==sx and l[i][1]>sy:
        u+=1
    elif l[i][0]<sx and l[i][1]==sy:
        h+=1
    elif l[i][0]>sx and l[i][1]==sy:
        m+=1
    elif l[i][0]>sx and l[i][1]>sy:
        mu+=1
    elif l[i][0]<sx and l[i][1]>sy:
        hu+=1
    elif l[i][0]>sx and l[i][1]<sy:
        ms+=1
    else:
        hs+=1
ans=[0]*4
ans[0]=u+mu+hu
ans[1]=h+hu+hs
ans[2]=s+ms+hs
ans[3]=m+ms+mu
mans=max(ans)
md=ans.index(mans)
if md==0:
    print(mans+sxsy)
    print(sx,sy+1)
elif md==1:
    print(mans+sxsy)
    print(sx-1,sy)
elif md==2:
    print(mans+sxsy)
    print(sx,sy-1)
else:
    print(mans+sxsy)
    print(sx+1,sy)