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,z,y=map(int,input().split(" "))
a=[]
for _ in range(n):
    b=list(map(int,input().split(" ")))
    a.append(b)
suma=0
sumb=0
sumc=0
sumd=0
for x in range(0,n):
    if z-a[x][0]>0:
        suma+=1
    if z-a[x][0]<0:
        sumb+=1
    if y-a[x][1]>0:
        sumc+=1
    if y-a[x][1]<0:
        sumd+=1
if sumc>=suma and sumc>=sumb and sumc>=sumd:
    print(sumc)
    print(f'{z} {y-1}')
elif suma>sumb and suma>sumc and suma>sumd:
    print(suma)
    print(f'{z-1} {y}')
elif sumd>=suma and sumd>=sumc and sumd>=sumb:
    print(sumd)
    print(f'{z} {y+1}')
else:
    print(sumb)
    print(f'{z+1} {y}')