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 sys import stdin

m = 10 ** 9 + 1
dx, dy = [-1, 0, 1, 0, 1, -1, 1, -1], [0, 1, 0, -1, 1, -1, -1, 1]
rints = lambda: [int(x) for x in stdin.readline().split()]
valid = lambda x, y: x > -1 and y > -1 and x < m and y < m

n, x0, y0 = rints()
points, ans = [rints() for _ in range(n)], [0, 0, 0]

for i in range(4):
    tent, tem = [x0 + dx[i], y0 + dy[i]], 0

    if valid(tent[0], tent[1]):
        for x, y in points:
            if tent[1] > y0 and y >= tent[1] or tent[1] < y0 and y <= tent[1] or tent[0] > x0 and tent[0] <= x or tent[
                0] < x0 and tent[0] >= x:
                tem += 1

        if tem >= ans[0]:
            ans = [tem, tent[0], tent[1]]

print(ans[0])
print(' '.join(map(str, ans[1:])))
