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
# import sys
# sys.stdin=open("input1.in","r")
# sys.stdout=open("outpul.out","w")
n,a,b=map(int,input().split())
countyp=0
countyn=0
countxp=0
countxn=0
for i in range(n):
	x,y=map(int,input().split())
	if y>b:
		countyp+=1
	elif y<b:
		countyn+=1
	if x>a:
		countxp+=1
	elif x<a:
		countxn+=1
FLAG=0
max1=countyn
max2=countxn
if countyp>max1:
	max1=countyp
elif countxp>max2:
	max2=countxp
x=max(max1,max2)
print(max(max1,max2))
if x==countxp:
	print(a+1,b)
elif x==countyp:
	print(a,b+1)
elif x==countxn:
	print(a-1,b)
else:
	print(a,b-1)





