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 collections import defaultdict

a,sx,sy = map(int,input().split())
s = defaultdict(int)
for _ in range(a):
    px,py = map(int,input().split())
    # print(px,py)
    if px>sx:
        s['right'] +=1
    if py>sy:
        s['up'] += 1
    if px<sx:
        s['left'] +=1
    if py<sy:
        s['down'] += 1
max_stu = 0
pos = 0
for i in s.items():
    # print(i)
    if max_stu<i[1]:
        max_stu = i[1]
        pos = i[0]
print(max_stu)
if pos == 'right':
    print(sx+1,sy)
if pos == 'left':
    print(sx-1,sy)
if pos == 'up':
    print(sx,sy+1)
if pos == 'down':
    print(sx,sy-1)

