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
def zip_sorted(a,b): return zip(*sorted(zip(a,b)))[0],zip(*sorted(zip(a,b)))[1]
def gcd(a,b): return math.gcd(a,b)
def lcm(a,b): return ((a*b)//math.gcd(a,b))
def ncr(n,r): return math.comb(n,r)
def npr(n,r): return (math.factorial(n)//math.factorial(n-r))
def decimal_to_binary(n): return bin(n).replace("0b", "")
def binary_to_decimal(s): return int(s,2)

import sys, os.path
import math
from collections import defaultdict,deque

input = sys.stdin.readline

I = lambda : list(map(int,input().split()))
S = lambda : list(map(str,input1()))

def main():

	n,sx,sy = I()
	x_1= []
	y_1= []
	x_2= []
	y_2= []
	x_3= []
	y_3= []
	x_4= []
	y_4= []
	for i in range(n):
		xi,yi   = I()
		if -sx+xi>=0:
			if -sy+yi>=0:
				x_1.append(xi)
				y_1.append(yi)
			else:
				x_4.append(xi)
				y_4.append(yi)
		else:
			if -sy+yi>=0:
				x_2.append(xi)
				y_2.append(yi)
			else:
				x_3.append(xi)
				y_3.append(yi)
	x_1 = x_1+x_4
	x_2 = x_2+x_3
	y_1 = y_1+y_2
	y_3 = y_3+y_4
	x_1 = sorted(x_1)
	x_2 = sorted(x_2)
	y_1 = sorted(y_1)
	y_2 = sorted(y_3)
	if   len(x_1)==max(len(x_1),len(x_2),len(y_1),len(y_2)):
		print(len(x_1))
		print(min(x_1),sy)
	elif   len(x_2)==max(len(x_1),len(x_2),len(y_1),len(y_2)):
		print(len(x_2))
		print(min(x_2),sy)
	elif   len(y_1)==max(len(x_1),len(x_2),len(y_1),len(y_2)):
		print(len(y_1))
		print(min(y_1),sx)
	elif   len(y_2)==max(len(x_1),len(x_2),len(y_1),len(y_2)):
		print(len(y_2))
		print(min(y_2),sx)
main()
