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
R = lambda: map(int, sys.stdin.readline().rstrip("\r\n").split())
n, sx, sy = R()
l = r = d = u = 0
for _ in range(n):
    a, b = R()
    if a < sx:
        l += 1
    elif a > sx:
        r += 1
    if b < sy:
        d += 1
    elif b > sy:
        u += 1
m = max((l, r, d, u))
print m
if m == l:
    print sx - 1, sy
elif m == r:
    print sx + 1, sy
elif m == d:
    print sx, sy - 1
else:
    print sx, sy + 1
