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
input=sys.stdin.buffer.readline #FOR READING PURE INTEGER INPUTS (space separation ok)


n,sx,sy=[int(x) for x in input().split()]
up=0
down=0
left=0
right=0
for _ in range(n):
    x,y=[int(x) for x in input().split()]
    if sx<x:
        right+=1
    if x<sx:
        left+=1
    if sy<y:
        up+=1
    if y<sy:
        down+=1
c=max(up,down,left,right)
print(c)
if c==up:print('{} {}'.format(sx,sy+1))
elif c==down:print('{} {}'.format(sx,sy-1))
elif c==left:print('{} {}'.format(sx-1,sy))
elif c==right:print('{} {}'.format(sx+1,sy))