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 = map(int, input().split())
homes = [list(map(int, input().split())) for _ in range(n)]
homes = [[a - sx, b - sy] for a, b in homes]
print (homes)

def s(n):
    # Returns sign
    # not really
    if n == 0: return 1000
    return n // abs(n)
def count(tx, ty, homes):
    c = 0
    for x, y in homes:
        if 0 <= tx * s(x) <= abs(x) and 0 <= ty * s(y) <= abs(y):
            # print(x, y, tx, ty)
            c += 1
    # print ()
    return c

points = [[a, b] for a in range(-1, 2) for b in range(-1, 2) if (a != 0 or b != 0)]
mc, ax, ay = -1, -10, -10
for x, y in points:
    c = count(x, y, homes)
    if c > mc:
        mc = c
        ax = x
        ay = y
print (mc)
print (ax + sx, ay + sy)