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()] 
d={}

if (sx>=1 and sy>=1):
  d[(sx-1,sy)]=0
  d[(sx,sy-1)]=0
elif sx==0 :
  d[(sx,sy-1)]=0
else:
  d[(sx-1,sy)]=0

if (sx<1000000000 and sy<1000000000):
  d[(sx,sy+1)]=0
  d[(sx+1,sy)]=0
elif sx==1000000000:
  d[(sx,sy+1)]=0
else:
  d[(sx+1,sy)]=0

for i in range(n):
  x, y = [int(x) for x in input().split()] 

  if x>sx and y>sy:
    d[(sx,sy+1)]+=1
    d[(sx+1,sy)]+=1
  elif x<sx and y>sy:
    d[(sx,sy+1)]+=1
    d[(sx-1,sy)]+=1
  elif x>sx and y<sy:
    d[(sx+1,sy)]+=1
    d[(sx,sy-1)]+=1
  elif x<sx and y<sy:
    d[(sx-1,sy)]+=1
    d[(sx,sy-1)]+=1
  elif x==sx and y>sy:
    d[(sx,sy+1)]+=1
  elif x==sx and y<sy:
    d[sx,sy-1]+=1
  elif y==sy and x>sx:
    d[(sx+1,sy)]+=1
  else:
    d[(sx-1,sy)]+=1
  
max=0
for i in d.keys():
  if d[i]>max:
    max=d[i]
    ans=i
  
print(max)
print(str(ans[0])+" "+str(ans[1]))



