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
sx=[0,0]
n,sx[0],sx[1]=map(int,sys.stdin.readline().strip().split())
g=[[0,0] for i in range(n)]
def getDistance(x,y):
	return abs(x[0]-y[0])+abs(x[1]-y[1])
for i in range(n):
	x,y=map(int,sys.stdin.readline().strip().split())
	g[i][0]=x
	g[i][1]=y
dx=[-1,0,1,0]
dy=[0,1,0,-1]
maxDist=[0,0]
ans=0
for dr in range(4):
	tent=[sx[0],sx[1]]
	tent[0]+=dx[dr]
	tent[1]+=dy[dr]
	if tent[0]<0 or tent[0]>int(1e9) or tent[1]<0 or tent[1]>int(1e9):
		continue
	cnt=0
	for i in range(n):
		if getDistance(g[i],tent)+getDistance(tent,sx)==getDistance(g[i],sx):
			cnt+=1
	if ans<cnt:
		ans=cnt
		maxDist[0]=tent[0]
		maxDist[1]=tent[1]
print(ans)
print(maxDist[0],maxDist[1])