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


n, x, y = map(int, input().split())
c1, c2, c3, c4 = 0, 0, 0, 0
for i in range(n):
    xi, yi = map(int, stdin.readline().split())
    dx = xi - x
    dy = xi - y
    if dx > 0:
        c1 += 1
    if dy > 0:
        c2 += 1
    if dx < 0:
        c3 += 1
    if dy < 0:
        c4 += 1

c = max(c1, c2, c3, c4)
print(c)
if c1 == c:
    print(x + 1, y)
elif c2 == c:
    print(x, y + 1)
elif c3 == c:
    print(x - 1, y)
elif c4 == c:
    print(x, y - 1)


# noinspection PyShadowingBuiltins
def input():
    return stdin.readline().rstrip("\r\n")
