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 collections import defaultdict
n, sx, sy = map(int, input().split())
pos = defaultdict(int)
for i in range(n):
    ix, iy = map(int, input().split())
    l = abs(sx - ix) + abs(sy - iy)
    dots = set()
    for dx in range(l):
        for dy in range(l - dx):
            if dx + dy > l:
                continue
            if iy + dy <= 10**9 and ix + dx <= 10**9:
                dots.add((ix + dx, iy + dy))
            if ix > dx and iy + dy <= 10**9:
                dots.add((ix - dx, iy + dy))
            if iy > dy and ix + dx <= 10**9:
                dots.add((ix + dx, iy - dy))
            if ix > dx and iy > dy:
                dots.add((ix - dx, iy - dy))
    for item in dots:
        pos[item] += 1

pos = dict(pos)
s = (sx, sy)
if s in pos:
    del pos[s]
m = 0
c = None
for key in pos.keys():
    if pos[key] > m:
        m = pos[key]
        c = key
print(m)
print(c[0], c[1])
