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,x,y=map(int,input().split())
import math
n1=0
n2=0
n3=0
n4=0
for i in range(n):
    a,b=map(int,input().split())
    if b>y:
        n1+=1
    elif b<y:
        n3+=1
    if a>x:
        n2+=1
    elif a<x:
        n4+=1
    if max(n1,n2,n3,n4)>=math.ceil(n/2):
        break
if x==0 and y==0:
    n3=-1
    n4=-1
elif x==0 and y==10**9:
    n1=-1
    n4=-1
elif x==10**9 and y==0:
    n2=-1
    n3=-1
elif x==10**9 and x==y:
    n1=-1
    n2=-1
elif x==0:
    n4=-1
elif y==0:
    n3=-1
elif x==10**9:
    n2=-1
elif y==10**9:
    n1=-1
m=max(n1,n2,n3,n4)
print(m)
if n1==m and y+1<=10**9:
    print(x,y+1,sep=" ")
elif n2==m and x+1<=10**9:
    print(x+1,y,sep=" ")
elif n3==m and y-1>=0:
    print(x,y-1,sep=" ")
elif n4==m and x-1>=0:
    print(x-1,y,sep=" ")


    

    
        
    
        
    
    
    
    


