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
INT_MAX=10**20+7
MOD=10**9+7
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
#==================================================================
n,sx,sy=INPUT()
xp=0
xn=0
yp=0
yn=0
first=0
second=0
third=0
fourth=0
for i in range(n):
    x,y=INPUT()
    if y==sy:
        if x>sx:
            xp+=1
        else:
            xn+=1
    elif x==sx:
        if y>sy:
            yp+=1
        else:
            yn+=1
    else:
        if x>sx and y<sy:
            fourth+=1
        elif x>sx and y>sy:
            first+=1
        elif x<sx and y>sy:
            second+=1
        else:
            third+=1
A=[]
A.append(fourth+first+xp)
A.append(second+third+xn)
A.append(second+first+yp)
A.append(third+fourth+yn)
i=A.index(max(A))
print(A[i])
if i==0:
    print(sx+1,sy)
elif i==1:
    print(sx-1,sy)
elif i==2:
    print(sx,sy+1)
else:
    print(sx,sy-1)
