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
input = sys.stdin.buffer.readline

#ライブラリインポート
from collections import defaultdict

#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N, sx, sy = getlist()
	a = 0
	b = 0
	c = 0
	d = 0
	for i in range(N):
		x, y = getlist()
		if y >= sy + 1:
			a += 1
		if x <= sx - 1:
			b += 1
		if x >= sx + 1:
			c += 1
		if y <= sy - 1:
			d += 1
	D = max(a, b, c, d)
	if a == D:
		print(a)
		print(sx, sy + 1)
	elif b == D:
		print(b)
		print(sx - 1, sy)
	elif c == D:
		print(c)
		print(sx + 1, sy)
	else:
		print(d)
		print(sx, sy - 1)

if __name__ == '__main__':
	main()