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 os import path
import sys
# mod = int(1e9 + 7)
# import re  # can use multiple splits
from math import ceil, floor,gcd,log,log2
from collections import defaultdict , Counter
from itertools import permutations
# from bisect import bisect_left, bisect_right
#popping from the end is less taxing,since you don't have to shift any elements
maxx = float('inf')

if (path.exists('input.txt')): 
	#------------------Sublime--------------------------------------#
	sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');
	I = lambda :int(sys.stdin.buffer.readline())
	tup= lambda : map(int , sys.stdin.buffer.readline().split())
	lint = lambda :[int(x) for x in sys.stdin.buffer.readline().split()]
	S = lambda: sys.stdin.readline().replace('\n', '').strip()
	def grid(r, c): return [lint() for i in range(r)]
	# def debug(*args, c=6): print('\033[3{}m'.format(c), *args, '\033[0m', file=sys.stderr)
	stpr = lambda x : sys.stdout.write(f'{x}' + '\n')
	star = lambda x: print(' '.join(map(str, x)))


else:
	#------------------PYPY FAst I/o--------------------------------#
	I = lambda :int(sys.stdin.buffer.readline())
	tup= lambda : map(int , sys.stdin.buffer.readline().split())
	lint = lambda :[int(x) for x in sys.stdin.buffer.readline().split()]
	S = lambda: sys.stdin.readline().replace('\n', '').strip()
	def grid(r, c): return [lint() for i in range(r)]
	stpr = lambda x : sys.stdout.write(f'{x}' + '\n')
	star = lambda x: print(' '.join(map(str, x)))

#left shift --- num*(2**k) --(k - shift)
n , x , y = tup()
ar ,d =[] , defaultdict(list)
for i in range(n):
	a , b = tup()
	ar.append((a,b))
d = {(x +1 ,y ) : 0 , (x , y+1) :0 , (x-1 ,y) :0 , (x , y-1) :0}
for i in range(n):
	p1 , p2 ,p3 , p4 = (x +1 ,y ) , (x , y+1) , (x-1 ,y) , (x , y-1)
	if ar[i][0] >= p1[0]:
		# print(ar[i] , p1,"p1")
		d[p1]+=1
	if ar[i][1] >= p2[1]:
		# print(ar[i] , p2,"p2")
		d[p2]+=1
	if ar[i][0] <= p3[0] :
		# print(ar[i] , p3 , "p3")
		d[p3]+=1
	if  ar[i][1] <= p4[1]:
		# print(ar[i] , p4 ,"p4")
		d[p4]+=1
m1 , m2 =  - 1, -1
for i in d :
	if d[i] > m1:
		m1 = d[i]
		m2 = i
print(m1)
print(*m2)