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, s1, s2 = map(int, input().split())
p1 = []
p2 = []
p3 = []
p4 = []
a = 0
b = 0
c = 0
d = 0
for i in range(n):
	x, y = map(int, input().split())
	if s1 < x and s2 < y:
		a += 1
		b += 1
	elif s1 > x and s2 < y:
		b += 1
		c += 1
	elif s1 > x and s2 > y:
		c += 1
		d += 1
	elif s1 < x and s2 > y:
		d += 1
		a += 1
	else:
		if x == s1 and y > s2:
			b += 1
		elif x == s1 and y < s2:
			d += 1
		elif y == s2 and x < s1:
			c += 1
		elif y == s2 and x > s1:
			a += 1
print(max(a, b, c, d))
if a == max(a, b, c, d):
	print(s1+1, s2)
elif b == max(a, b, c, d):
	print(s1, s2 + 1)
elif c == max(a, b, c, d):
	print(s1 - 1, s2)
elif d == max(a, b, c, d):
	print(s1, s2 - 1)