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())
l,r,u1,d1=0,0,0,0
for _ in " "*a:
    u,v=map(int,input().split())
    if u==b:
        if v<c:l+=1
        else:r+=1
    elif v==c:
        if u<b:u1+=1
        else:d1+=1
    elif u>b and v<c:l+=1;d1+=1
    elif u<b and v<c:l+=1;u1+=1
    elif u<b and v>c:u1+=1;r+=1
    else:d1+=1;r+=1
print(max(l,r,d1,u1))
if max(l,r,d1,u1)==l:print(b,c-1)
elif max(l,r,d1,u1)==r:print(b,c+1)
elif max(l,r,d1,u1)==u1:print(b-1,c)
else:print(b+1,c)
