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=[int(i) for i in raw_input().split()]
a=[]
cx=0
cy=0
for i in range(n):
    a1,a2=[int(i) for i in raw_input().split()]
    a.append([a1,a2])
m=0
c1=0
c2=0
c3=0
c4=0
for i in a:
    if i[1]>y and y<10**9:
        c1+=1
    if i[1]<y and y>0:
        c2+=1
    if i[0]>x and x<10**9:
        c3+=1
    if i[0]<x and x>0:
        c4+=1
m=max(c1,c2,c3,c4)
print m
if c1==m:
    print x,y+1
elif c2==m:
    print x,y-1
elif c3==m:
    print x+1,y
else:
    print x-1,y
