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
input = __import__("sys").stdin.readline

n, sx, sy = map(int, input().split())
first, second, third, fourth, negx, negy, x, y = 0, 0, 0, 0, 0, 0, 0, 0
for i in range(n):
	a, b = map(int, input().split())
	a -= sx
	b -= sy
	if a!=0 and b!=0:
		if a>0 and b>0:
			first += 1
		elif a<0 and b>0:
			second += 1
		elif a<0 and b<0:
			third += 1
		else:
			fourth += 1
	else:
		if a == 0:
			if b > 0:
				y += 1
			else:
				negy += 1
		else:
			if a > 0:
				x += 1
			else:
				negx += 1
x += fourth + first
y += first + second
negx += second + third
negy += third + fourth
ans = max(x, y, negx, negy)
print ans
if ans == x:
	print sx+1, sy
elif ans == negx:
	print sx-1, sy
elif ans == y:
	print sx, sy+1
else:
	print sx, sy-1