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
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

n, sx, sy = [int(item) for item in input().split()]
tents = [0] * 4
for i in range(n):
    x, y = [int(item) for item in input().split()]
    if y > sy:
        tents[0] += 1
    if y < sy:
        tents[2] += 1
    if x > sx:
        tents[1] += 1
    if x < sx:
        tents[3] += 1

cnt = max(tents)
max_id = tents.index(cnt)
print(cnt)
if max_id == 0:
    print(sx, sy+1)
elif max_id == 1:
    print(sx+1, sy)
elif max_id == 2:
    print(sx, sy-1)
elif max_id == 3:
    print(sx-1, sy)