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,sy=0,0
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]
mX,mY=0,0
ans=0
Maxi=int(1e9)
def abso(x):
	return -x if x<0 else x
for dr in range(4):
	tentx,tenty=0,0
	tentx=sx+dx[dr]
	tenty=sy+dy[dr]
	if tentx<0 or tentx>Maxi or tenty<0 or tenty>Maxi:
		continue
	cnt=0
	for i in range(n):
		d1=abso(g[i][0]-tentx)+abso(g[i][1]-tenty)
		d2=abso(tentx-sx)+abso(tenty-sy)
		d3=abso(g[i][0]-sx)+abso(g[i][1]-sy)
		if d1+d2==d3:
			cnt+=1
	if ans<cnt:
		ans=cnt
		mX=tentx
		mY=tenty
print(ans)
print(mX,mY)