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,sy,sx=map(int,input().split())
p1=0;p2=0;p3=0;p4=0
for i in range(n):
    x,y=map(int,input().split())
    if x<sx and y<sy:
        p1+=1;p4+=1
    elif x<sx and y>sy:
        p1+=1;p2+=1
    elif x>sx and y>sy:
        p2+=1;p3+=1
    elif x>sx and y<sy:
        p4+=1;p3+=1
    elif x==sx and y>sy:p2+=1
    elif x==sx and y<sy:p4+=1
    elif y==sy and x<sx:p1+=1
    else:p3+=1
if sx==0:
    p1=-1
if sy==0:
    p4=-1
if sy==10**9:
    p2=-1
if sx==10**9:
    p3=-1
k=max(p1,p2,p3,p4)
print(k)
if p1==k:
    print(sx-1,sy)
elif p2==k:
    print(sx,sy+1)
elif p3==k:
    print(sx+1,sy)
else:
    print(sx,sy-1)
    
