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
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])
		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 ans<cnt:
		ans=cnt
		mX=tentx
		mY=tenty
print(ans)
print(mX,mY)