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,xs,ys=[int(element) for element in input().split(" ")]

liste=[]
for iteration in range(n):
    x,y=[int(element) for element in input().split(" ")]
    liste.append( (x,y) )

best_coord=[(xs,ys+1),(xs-1,ys),(xs,ys-1),(xs+1,ys)]
max_outreach=[0,0,0,0]

for i in range(len(liste)):
    x,y=liste[i]
    if y>ys:
        max_outreach[0]+=1
    if x<xs:
        max_outreach[1]+=1
    if y<ys:
        max_outreach[2]+=1
    if x>xs:
        max_outreach[3]+=1


m=max(max_outreach)
for i in range(4):
    if m==max_outreach[i]:
        x,y=best_coord[i]
        break

print(str(m)+'\n'+str(x)+' '+str(y))
