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=r=l=0
for _ in range(n):
	x,y=R()
	if x>s1:r+=1
	elif x<s1:l+=1
	if y>s2:u+=1
	elif y<s2:d+=1
m=max([r,l,d,u])
print(m)
if m==r:print(s1+1,s2)
elif m==l:print(s1-1,s2)
elif m==u:print(s1,s2+1)
elif m==d:print(s1,s2-1)