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

def dist(x1,y1,x2,y2):
	return abs(x1-x2)+abs(y1-y2)

[n,sx,sy]=[int(i) for i in sys.stdin.readline().split()]

coord=[]

for i in range(n):
	[x,y]=[int(j) for j in sys.stdin.readline().split()]
	coord.append([x,y])

arr=[-1,0,1]

ans_arr=[0,0]

ans=0

for a in range(len(arr)):
	for b in range(len(arr)):
		if(not(arr[a]==0 and arr[b]==0)):
			xc=sx+arr[a]
			yc=sy+arr[b]

			count=0

			if(0<=xc<=pow(10,9) and 0<=yc<=pow(10,9)):
				
				for g in range(n):
					if(dist(xc,yc,coord[g][0],coord[g][1])<dist(sx,sy,coord[g][0],coord[g][1])):
						count+=1

			if(count>ans):
				ans=count
				ans_arr[0]=xc
				ans_arr[1]=yc

print(ans)
print(ans_arr[0],ans_arr[1])