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
R=lambda:map(int,input().split())
n,s1,s2=R();u=d=0
for _ in range(n):
	x,y=R()
	if x==s1:
		if y>s2:u+=1
		else:d+=1
	elif x>s1:u+=1
	else:d+=1
if u>d:print(u);print(s1+1,s2)
else:print(d);print(s1-1,s2)