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
import sys 
input=sys.stdin.readline 
n,sx,sy=map(int,input().split())
l=[]
for i in range(n):
    a,b=map(int,input().split())
    l.append([a,b])
#left side &&right 
left=0
right=0
for i in range(n):
    if l[i][0]<sx:
        left+=1 
    elif l[i][0]>sx:
        right+=1 
m1=0 
ans=-1 
if left>=right:
    m1=left 
    ans=[sx-1,sy]
else: 
    m1=right
    ans=[sx+1,sy]
#up && down 
up=0 
down=0 
for i in range(n):
    if l[i][0]<sy:
        down+=1 
    elif l[i][0]>sy:
        up+=1 
m2= 0 
ans2=[]
if down>=up:
    m2=down
    ans2=[sx,sy-1]
else:
    m2=up 
    ans2=[sx,sy+1]
if m1>=m2:
    print(m1)
    print ans[0],ans[1] 
else:
    print(m2)
    print ans2[0],ans2[1] 
#print(left,right,up,down)

