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
s = list(map(int,input().split()))
n = s[0]
a = s[1]
b = s[2]
p1 = p2 = p3 = p4 = 0
for i in range(n):
	q = list(map(int,input().split()))
	if q[0] < a:
		p1+=1
	elif q[0] > a:
		p2 += 1
	if q[1] < b:
		p3 += 1
	elif q[1] > b:
		p4+=1
x = max(p1,p2,p3,p4)
print(x)
if p1==x:
	print(a-1,b)
elif p2==x:
	print(a+1,b)
elif p3==x:
	print(a,b-1)
elif p4==x:
	print(a,b+1)
