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

# 200000 100000000 100000000
n, sx, sy = map(int, input().split())


def f(n):
    n = str(n)[0]
    if n == '0': return 0
    if n[0] == '-': return -1
    return 1


def can_reach(x, y, tx, ty):
    if ty > 0 and y < 0: return False
    if ty < 0 and y > 0: return False
    if tx > 0 and x < 0: return False
    if tx < 0 and x > 0: return False
    x, y, tx, ty = map(abs, [x, y, tx, ty])
    return 0 <= ty <= y and 0 <= tx <= x


def main():
    # homes = [tuple(map(lambda t: f(int(t)), input().split())) for _ in range(n)]
    d = {(-1, -1): 0, (-1, 0): 0, (-1, 1): 0, (0, -1): 0, (0, 1): 0, (1, -1): 0, (1, 0): 0, (1, 1): 0}
    for _ in range(n):
        x, y = sys.stdin.readline().split()
        # x = randint(-10 ** 9, 10 ** 9)
        # y = randint(-10 ** 9, 10 ** 9)
        x = f(int(x) - sx)
        y = f(int(y) - sy)
        d[(x, y)] += 1

    # print ("DONE")
    # print (homes)

    def count(tx, ty, d):
        # print (d)
        c = 0
        for t, cu in d.items():
            # print (t)
            x, y = t[0], t[1]
            if can_reach(x, y, tx, ty):
                c += cu
                # print (t, tx, ty, cu)
        # 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, d)
        if c > mc:
            mc = c
            ax = x
            ay = y
    print(mc)
    print(ax + sx, ay + sy)


main()
# cProfile.run('main()')