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 atexit
import io
import sys

_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER


@atexit.register
def write():
    sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
###################################################

def num():
    return int(input())
def line():
    return map(int, input().split())

from itertools import repeat
from operator import itemgetter as ig

def sign(x):
    if x==0:
        return 0
    if x>0:
        return 1
    return -1

n,*s = line()

q = [0,0,0,0]
for x,y in (line() for _ in repeat(None, n)):
    x,y = x-s[0],y-s[1]
    if x>0:
        q[0]+=1
    if x<0:
        q[1]+=1
    if y>0:
        q[2]+=1
    if y<0:
        q[3]+=1
v = max(enumerate(q), key=ig(1))
print(v[1])
if v[0]==0:
    print(s[0]+1, s[1])
if v[0]==1:
    print(s[0]-1, s[1])
if v[0]==2:
    print(s[0], s[1]+1)
if v[0]==3:
    print(s[0], s[1]-1)
