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
n,sx,sy = map(int,input().split())
l=[]
md=[0,0,0,0]
ax=[0,0,0,0]
for i in range(n):
	x,y = map(int,input().split())
	l.append([x,y])
	if x==sx:
		ax[int(sy<y)]+=1
	elif y==sy:
		ax[2+int(sx<x)]+=1
	else:
		md[int(sy<y)*2 +  int(sx<x)]+=1
l = [md[0]+md[1]+ax[1],md[0]+md[2]+ax[2],md[3]+md[2]+ax[0],md[3]+md[1]+ax[3]]
d = [[1,0],[0,1],[-1,0],[0,-1]]
k = l.index(max(l))
print(max(l))
print(sx+d[k][0],sy+d[k][1])
