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
# template begins 
##################################### 
  
# import libraries for input/ output handling 
# on generic level 
import atexit, io, sys 
  
# A stream implementation using an in-memory bytes  
# buffer. It inherits BufferedIOBase. 
buffer = io.BytesIO() 
sys.stdout = buffer
  
# print via here 
@atexit.register 
def write(): 
    sys.__stdout__.write(buffer.getvalue()) 
  
##################################### 
# template ends 
n,x,y=[int(x) for x in raw_input().split()]
pos=[]
pos.append([x,y+1])
pos.append([x,y-1])
pos.append([x-1,y-1])
pos.append([x-1,y])
pos.append([x-1,y+1])
pos.append([x+1,y+1])
pos.append([x+1,y])
pos.append([x+1,y-1])
d=[]
sx=x
sy=y
pts=[]
for i in range(0,n):
    x,y=[int(x) for x in raw_input().split()]
    dist=abs(x-sx)+abs(y-sy)
    d.append(dist)
    pts.append([x,y])
maxm=0
# print(d)
# print(pts)
for i in range(0,8):
    xd=pos[i][0]
    yd=pos[i][1]
    ans=0
    for j in range(0,n):
        if xd>=0 and yd>=0:
            x=pts[j][0]
            y=pts[j][1]
            dist=abs(x-xd)+abs(y-yd)
            dist2=abs(xd-sx)+abs(yd-sy)
            if dist+dist2==d[j]:
                ans+=1
    if maxm<ans:
        maxm=ans
        maxx=xd
        maxy=yd
print(maxm)
print maxx,maxy