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
a,b,c=map(int,input().split())
up=0
down=0
left=0
right=0
for i in range(a):
    m,n=map(int,input().split())
    if m>b:
        right+=1
    if m<b:
        left+=1
    if n>c:
        up+=1
    if n<c:
        down+=1
p = max(up,down,left,right)
print(str(p))
if up==p:
    print(str(b)+' '+str(c+1))
elif down==p:
    print(str(b)+' '+str(c-1))
elif left==p:
    print(str(b-1)+' '+str(c))
elif right==p:
    print(str(b+1)+' '+str(c))