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
n,a,b=[int(i) for i in input().split()]
r,l,u,d=0,0,0,0
for i in range(n):
    x,y=[int(i) for i in input().split()]
    if x>a:
        r+=1
    elif x<a:
        l+=1
    if y>b:
        u+=1
    elif y<b:
        d+=1
z=max(r,l,u,d)
print(z)
if r==z:
    print(a+1,b)
elif l==z:
    print(a-1,b)
elif u==z:
    print(a,b+1)
else:
    print(a,b-1)
