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
from sys import stdin
input = stdin.readline
n, x_s, y_s = map(int,input().split())
x = [0] * n
y = [0] * n
g = 0
d = 0
p = 0
l = 0
for i in range(n):
	a,b = map(int,input().split())
	x[i] = a - x_s
	y[i] = b - y_s
	if x[i] > 0:
		p += 1
	if x[i] < 0:
		l += 1
	if y[i] > 0:
		g += 1
	if y[i] < 0:
		d += 1
c = max(g,d,p,l)
import sys
print(c)
if g == c:
	print(x_s,y_s+1)
	sys.exit(0)
if d == c:
	print(x_s, y_s-1)
	sys.exit(0)
if p == c:
	print(x_s+1, y_s)
	sys.exit(0)
if l == c:
	print(x_s-1, y_s)
	sys.exit(0)
