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,sx,sy=[int(x) for x in input().split()]
x1=[]
y1=[]
cox=0
coy=0
for i in range(0,n):
    x,y=[int(x) for x in input().split()]
    if(sx<=x):
        cox=cox+1
    if(sy<=y):
        coy=coy+1
if(coy>cox):
    if(coy>n//2):
        print(coy)
        print(sx,sy+1)
    else:
        print(n-coy)
        print(sx,sy-1)
else:
    if(cox>n//2):
        print(cox)
        print(sx+1,sy)
    else:
        print(n-cox)
        print(sx-1,sy)
    
    
    
    
    
