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=map(int,input().split())
l=[tuple(map(int,input().split())) for _ in range(n)]
q=[]
c1,c2,c3,c4=0,0,0,0
for x,y in l:
    if x>a:
        c1+=1
    if x<a:
        c2+=1
    if y>b:
        c3+=1
    if y<b:
        c4+=1
s=max(c1,c2,c3,c4)
if s==c1:
    print(c1)
    print(a+1,b)
elif s==c2:
    print(c2)
    print(a-1,b)
elif s==c3:
    print(c3)
    print(a,b+1)
else:
    print(c4)
    print(a,b-1)