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
n, sx, sy = map(int, input().split())
count = [0]*4
delta = [[-1, 0], [1, 0], [0, -1], [0, 1]]

for x, y in (map(int, l.split()) for l in sys.stdin):
    if x < sx:
        count[0] += 1
    elif sx < x:
        count[1] += 1
    if y < sy:
        count[2] += 1
    elif sy < y:
        count[3] += 1

if sx == 0:
    count[0] = 0
if sx == 10**9:
    count[1] = 0
if sy == 0:
    count[2] = 0
if sy == 10**9:
    count[3] = 0

max_c = max(count)
for i in range(4):
    if max_c == count[i]:
        print(max_c)
        print(sx+delta[i][0], sy+delta[i][1])
        break
