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
def fastio():
	import sys
	from io import StringIO 
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))
from math import gcd
from collections import defaultdict as dd

n, sx, sy = I()
l, r, u, d = 0, 0, 0, 0
for i in range(n):
	x, y = I()
	if x == sx:
		if y < sy:
			d += 1
		else:
			u += 1
	elif y == sy:
		if x < sx:
			l += 1
		else:
			r += 1
	elif x > sx and y > sy:
		r += 1
		u += 1
	elif x < sx and y > sy:
		l += 1
		u += 1
	elif x > sx and y < sy:
		r += 1
		d += 1
	else:
		l += 1
		d += 1
m = max(l, r, u, d)
print(m)
if m == l:
	sx -= 1
elif m == r:
	sx += 1
elif m == u:
	sy += 1
else:
	sy -= 1
print(sx, sy)