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
import sys
input = sys.stdin.buffer.readline

n , Sx , Sy = [int(i) for i in input().split()]
Q1 =  Q2 =  Q3 = Q4 = N = E = S = W = 0
for i in range(n):
    x,y = [int(i) for i in input().split()]
    rel_x = x - Sx ; rel_y = x - Sy
    if   x == Sx: 
        if rel_x > 0: E += 1
        else:         W += 1
    elif y == Sy:
        if rel_y > 0: N += 1
        else:         S += 1
    else:
        if rel_x > 0 and rel_y > 0  : Q1 += 1
        elif rel_x < 0 and rel_y > 0: Q2 += 1
        elif rel_x < 0 and rel_y < 0: Q3 += 1
        else:                         Q4 += 1

U = Q1 + Q2 + N
D = Q3 + Q4 + S
R = Q1 + Q4 + E
L = Q2 + Q3 + W
ans = max(U,D,R,L)
px = py = 0
print(ans)
if   ans == U:
    px = Sx     ; py = Sy + 1
elif ans == D:
    px = Sx     ; py = Sy - 1
elif ans == R:
    px = Sx + 1 ; py = Sy
else:
    px = Sx - 1 ; py = Sy
print(str(px) + ' ' + str(py))
