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=map(int,input().split())
lx=sx-1
ly=sy
rx=sx+1
ry=sy
ux=sx
uy=sy+1
dx=sx
dy=sy-1

l=list()
l.append([0,dx,dy])
l.append([0,rx,ry])
l.append([0,ux,uy])
l.append([0,lx,ly])

for i in range(n):
    x,y=map(int,input().split())
    
    if(x==sx and y<sy):
        l[0][0]+=1
    elif(x==sx and y>sy):
        l[2][0]+=1
    elif(y==sy and x<sx):
        l[3][0]+=1
    elif(y==sy and x>sx):
        l[1][0]+=1
    elif(x<sx and y<sy):
        l[0][0]+=1
        l[3][0]+=1
    elif(x>sx and y<sy):
        l[0][0]+=1
        l[1][0]+=1
    elif(x>sx and y>sy):
        l[1][0]+=1
        l[2][0]+=1
    elif(x<sx and y>sy):
        l[2][0]+=1
        l[3][0]+=1
maxi=-1
ind=-1
for i in range(4):
    if(l[i][0]>maxi):
        maxi=l[i][0]
        ind=i

print(l[ind][0])
print(l[ind][1],l[ind][2])

        
    
    