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 functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda: sys.stdin.readline().rstrip("\r\n")
def value(): return tuple(map(int, input().split())) # multiple values
def arr(): return [int(i) for i in input().split()] # array input
def sarr(): return [int(i) for i in input()] #array from string
def starr(): return [str(x) for x in input().split()] #string array
def inn(): return int(input()) # integer input
def svalue(): return tuple(map(str, input().split())) #multiple string values
def parr(): return [(value()) for i in range(n)] # array of pairs
mo = 1000000007
# ----------------------------CODE------------------------------#
n,x,y=value()
cd=0
cl=0
cr=0
cu=0
for i in range(n):
    x1,y1=value()
    if(x1<x):
        cl+=1
    elif(x1>x):
        cr+=1
    if(y1<y):
        cd+=1
    elif(y1>y):
        cu+=1
mx=max(cl,cu,cd,cr)
ans=(0,0)
if(mx==cl):
    ans=(x-1,y)
elif(mx==cr):
    ans=(x+1,y)
elif(mx==cu):
    ans=(x,y+1)
else:
    ans=(x,y-1)
print(mx)
print(*ans)

