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
n,h,k=map(int,input().split())
x=[]
y=[]
for i in range(n):
	a,b=map(int,input().split())
	x.append(a-h)
	y.append(b-k)
d={1:0,2:0,3:0,4:0}
for i in range(n):
	if x[i]==0:
		if y[i]<0:
			d[4]+=1
		else:
			d[2]+=1
	elif y[i]==0:
		if x[i]<0:
			d[3]+=1
		else:
			d[1]+=1
	elif x[i]>0 and y[i]>0:
		d[1]+=1
		d[2]+=1
	elif x[i]>0 and y[i]<0:
		d[1]+=1
		d[4]+=1
	elif x[i]<0 and y[i]<0:
		d[4]+=1
		d[3]+=1
	else:
		d[2]+=1
		d[3]+=1
m=max(d[1],d[3],d[2],d[4])
print(m)
if m==d[1]:
	print(h+1,k)
elif m==d[2]:
	print(h,k+1)
elif m==d[3]:
	print(h-1,k)
else:
	print(h,k-1)