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
class Input:
    def __init__(self):
        from sys import stdin
        lines = stdin.readlines()
        self.lines = list([line.rstrip('\n') for line in reversed(lines) if line != '\n'])

    def input(self):
        return self.lines.pop()

    def input_int_list(self):
        return list(map(int, self.input().split()))

    def __bool__(self):
        return bool(self.lines)

inp = Input()
n, sx, sy = inp.input_int_list()
right = [0, (sx+1, sy)]
top = [0, (sx, sy+1)]
left = [0, (sx-1, sy)]
bottom = [0, (sx, sy-1)]
for __ in range(n):
    a, b = inp.input_int_list()
    if a > sx:
        right[0] += 1
    if a < sx:
        left[0] += 1
    if b > sy:
        top[0] += 1
    if b < sy:
        bottom[0] += 1
dir = [(a, b) for a, b in (right, top, left, bottom)]
dir.sort()
dir.reverse()
ans = dir[0]
print(ans[0])
print(" ".join(map(str,ans[1])))
#print(dir)
