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, sx, sy = [int(i) for i in input().split()]

q1,q2,q3,q4,a1,a2,a3,a4 = 0,0,0,0,0,0,0,0

for _ in range(n):
    x, y = [int(i) for i in input().split()]
    if x>sx:
        if y>sy: q1+=1
        elif y==sy: a1+=1
        else: q4+=1
    elif x<sx:
        if y>sy: q2+=1
        elif y==sy: a3+=1
        else: q3+=1
    else:
        if y>sy: a2+=1
        else: a4+=1

quad = [q1+q4+a1, q1+q2+a2, q2+q3+a3, q3+q4+a4]

print(max(quad))

ind = quad.index(max(quad))

if ind==0: print(sx+1, sy)
elif ind==1: print(sx, sy+1)
elif ind==2: print(sx-1, sy)
else: print(sx, sy-1)