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
n,sx,sy=map(int,sys.stdin.readline().strip().split())
g=[]
for i in range(n):
	x,y=map(int,sys.stdin.readline().strip().split())
	g.append([x,y])
dx=[-1,0,1,0]
dy=[0,1,0,-1]
ans=0
mX,mY=0,0
for dr in range(4):
	tentx=int(sx+dx[dr])
	tenty=int(sy+dy[dr])
	if tentx<0 or tentx>int(1e9) or tenty<0 or tenty>int(1e9):
		continue
	cnt=0
	for i in range(n):
		curx=int(g[i][0])
		cury=int(g[i][1])
		dx1,dx2,dx3=0,0,0
		dy1,dy2,dy3=0,0,0
		if curx-tentx<0: 
			dx1=tentx-curx
		else: 
			dx1=curx-tentx
		if cury-tenty<0: 
			dy1=tenty-cury
		else: 
			dy1=cury-tenty
		if tentx-sx>0: 
			dx2=tentx-sx
		else: 
			dx2=sx-tentx
		if tenty-sy>0: 
			dy2=tenty-sy
		else: 
			dy2=sy-tenty
		if curx-sx>0: 
			dx3=curx-sx
		else: 
			dx3=sx-curx
		if cury-sy>0: 
			dy3=cury-sy
		else: 
			dy3=sy-cury
		# if int(abs(curx-tentx))+int(abs(cury-tenty))+int(abs(tentx-sx))+int(abs(tenty-sy))==int(abs(curx-sx))+int(abs(cury-sy)):
		# 	cnt+=1
		if dx1+dy1+dx2+dy2==dx3+dy3:
			cnt+=1
	if ans<cnt:
		ans=cnt
		mX=tentx
		mY=tenty
print(ans)
print(mX,mY)
