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
#!/usr/bin/python3

import os
import sys


def main():
    N, X, Y = read_ints()
    P = [tuple(read_ints()) for _ in range(N)]
    c, x, y = solve(N, X, Y, P)
    print(c)
    print(x, y)


PX = 0
MX = 1
PY = 2
MY = 3


def ok(x, y):
    return 0 <= x <= 10 ** 9 and 0 <= y <= 10 ** 9


def solve(N, X, Y, P):
    counts = [0] * 4
    coords = [(X + 1, Y), (X - 1, Y), (X, Y + 1), (X, Y - 1)]
    for x, y in P:
        if x > X:
            counts[PX] += 1
        if x < X:
            counts[MX] += 1
        if y > Y:
            counts[PY] += 1
        if y < Y:
            counts[MY] += 1

    mc = max(counts)
    for i in range(4):
        if counts[i] == mc and ok(*coords[i]):
            return mc, coords[i][0], coords[i][1]

    assert False


###############################################################################

DEBUG = 'DEBUG' in os.environ


def inp():
    return sys.stdin.readline().rstrip()


def read_int():
    return int(inp())


def read_ints():
    return [int(e) for e in inp().split()]


def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)


if __name__ == '__main__':
    main()
