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 = input().split()
n = int(n)
sx = int(sx)
sy = int(sy)


def is_along_way(a1, a2, b1, b2, c1, c2):
	# if b1, b2 is along way from a1, a2 to c1, c2
	x_works = (a1 <= b1 and b1 <= c1) or (a1 >= b1 and b1 >= c1)
	y_works = (a2 <= b2 and b2 <= c2) or (a2 >= b2 and b2 >= c2)
	if x_works and y_works:
		return 1
	else:
		return 0

houses = []

for i in range(n):
	a, b = input().split()
	a = int(a)
	b = int(b)

	houses.append([a, b])

def test_location(m, n):
	score = 0
	for pt in houses:
		score += is_along_way(sx, sy, m, n, pt[0], pt[1])
	return score

pos_pairs = [(sx+1, sy), (sx-1, sy), (sx, sy+1), (sx, sy-1)]

best_pair = (0, 0)
best_score = 0

for i in range(4):
	score = test_location(pos_pairs[i][0], pos_pairs[i][1])
	if score > best_score:
		best_score = score
		best_pair = pos_pairs[i]

print(best_score)
for i in range(2):
	print(best_pair[i], end=" ")

