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, offx, offy = map(int, raw_input().split())
quad12, quad23, quad34, quad14 = 0, 0, 0, 0
l = []
for i in range(n):
	x, y = map(int, raw_input().split())
	x -= offx
	y -= offy
	l.append((x, y))
	if x < 0:
		quad12 += 1
	else:
		quad34 += 1
	if y < 0:
		quad14 += 1
	else:
		quad23 += 1

mx = max(quad12, quad23, quad34, quad14)

print mx 

if mx == quad12:
	print -1 + offx, 0 + offy
elif mx == quad23:
	print 0 + offx, 1 + offy
elif mx == quad34:
	print 1 + offx, 0 + offy
else:
	print 0 + offx, -1 + offy
