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
# code by RAJ BHAVSAR
n,school_x,school_y = map(int,input().split())
left,right,up,down = 0,0,0,0
for _ in range(n):
	tx,ty = map(int,input().split())
	if(tx < school_x):
		left += 1
	elif(tx > school_x):
		right += 1
	if(ty < school_y):
		down += 1
	elif(ty > school_y):
		up += 1
maxx = max(left,right,up,down)
if(maxx == left):
	school_x -= 1
elif(maxx == right):
	school_x += 1
elif(maxx == up):
	school_y += 1
else:
	school_y -= 1
print(maxx)
print(school_x,school_y)