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
(n, sx, sy) = map(int, input().split())
boy = list()
for i in range(n):
    (x, y) = map(int, input().split())
    boy.append([x, y])

test = list()
test.append([0, sx, sy + 1])
test.append([0, sx + 1, sy])
test.append([0, sx, sy - 1])
test.append([0, sx - 1, sy])

for i in range(n):
    if boy[i][1] > sy:
        test[0][0] += 1
    if boy[i][1] < sy:
        test[2][0] += 1
    if boy[i][0] < sx:
        test[3][0] += 1
    if boy[i][0] > sx:
        test[1][0] += 1

for i in range(4):
    if test[i][1] < 0 or test[i][2] < 0:
        test[i][0] = 0
    if test[i][1] > 10**9 or test[i][2] > 10**9:
        test[i][0] = 0
test.sort(reverse=True)
print(test[0][0])
print(test[0][1], test[0][2])
