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, bisect

n, sx, sy = map(int, sys.stdin.readline().split())
arr = []
for _ in range(n):
    a, b = map(int, sys.stdin.readline().split())
    arr.append((a,b))


temp = [[sx, sy + 1, 0], [sx, sy - 1, 0], [sx + 1, sy, 0], [sx - 1, sy, 0]]

for i in temp:
    for j in range(n):
        if i[1] > sy:
            if arr[j][1] >= i[1]:
                i[2] += 1
        elif i[1] < sy:
            if arr[j][1] <= i[1]:
                i[2] += 1
        elif i[0] > sx:
            if arr[j][0] >= i[0]:
                i[2] += 1
        elif i[0] < sx:
            if arr[j][0] <= i[0]:
                i[2] += 1

temp.sort(key=lambda x : -x[2])
for i in temp:
    if 0 <= i[0] <= pow(10, 9) and 0 <= i[1] <= pow(10, 9):
        print(i[2])
        print(i[0], i[1])
        break

