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=input().split()
n,sx,sy=int(n),int(sx),int(sy)
ymore,yless,xmore,xless=0,0,0,0
for i in range(n):
    x,y=input().split()
    x,y=int(x),int(y)
    if(x<sx):
        xless=xless+1
    else:
        xmore=xmore+1
    if(y<sy):
        yless=yless+1
    else:
        ymore=ymore+1
if(sx==1000000000):
    xmore=-1
if(sy==1000000000):
    ymore=-1
if(sx==0):
    xless=-1
if(sy==0):
    yless=-1
array=[xless,xmore,yless,ymore]
count=max(array)
ind=array.index(count)
if(ind==0):
    print(count)
    print(sx-1,sy)
elif(ind==1):
    print(count)
    print(sx+1,sy)
elif(ind==2):
    print(count)
    print(sx,sy-1)
else:
    print(count)
    print(sx,sy+1)