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

def LI():
    return map(int, sys.stdin.readline().split())

[N, sx, sy] = LI()
pts = [(0, 1), (1, 0), (0, -1), (-1, 0)]
v = [0] * 4
for _ in range(N):
    [x, y] = LI()
    if x > sx: v[1] += 1
    if x < sx: v[3] += 1
    if y > sy: v[0] += 1
    if y < sy: v[2] += 1
c = [(v, x, y) for (v, x, y) in 
     [(v[i], sx + pts[i][0], sy + pts[i][1]) for i in range(4)]
     if 0 <= x <= 10**9 and 0 <= y <= 10**9]
(v, x, y) = max(c, key=lambda t: t[0])
print(v)
print(x, y)

