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,s_x,s_y=map(int,input().split())
x_plus=0
x_minus=0
y_plus=0
y_minus=0
for i in range(n):
    x,y=map(int,input().split())
    if x>s_x:
        x_plus+=1
    elif x<s_x:
        x_minus+=1
    if y>s_y:
        y_plus+=1
    elif y<s_y:
        y_minus+=1
if x_plus>=max(y_plus,y_minus,x_minus):
    print(x_plus)
    print(s_x+1,s_y)
elif x_minus>=max(x_plus,y_plus,y_minus):
    print(x_minus)
    print(s_x-1,s_y)
elif y_plus>=max(x_plus,y_minus,x_minus):
    print(y_plus)
    print(s_x,s_y+1)
else:
    print(y_minus)
    print(s_x,s_y-1)