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
from sys import stdin

# noinspection PyShadowingBuiltins
input = lambda: stdin.readline().rstrip("\r\n")
input_a = lambda fun: map(fun, stdin.readline().split())

n, x, y = input_a(int)
right, up, left, down = 0, 0, 0, 0
for i in range(n):
    xi, yi = input_a(int)
    if xi > x:
        right += 1
    if yi > y:
        up += 1
    if xi < x:
        left += 1
    if yi < y:
        down += 1

c = max(right, up, left, down)
print(c)
if right == c:
    print(x + 1, y)
elif up == c:
    print(x, y + 1)
elif left == c:
    print(x - 1, y)
elif down == c:
    print(x, y - 1)
