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
'''input
7 10 12
5 6
20 23
15 4
16 5
4 54
12 1
4 15
'''

import sys
from collections import Counter
debug = 1
readln = sys.stdin.readline
#sys.setrecursionlimit(1000000)

def write(s):
    sys.stdout.write(str(s))

def writeln(s):
    sys.stdout.write(str(s))
    sys.stdout.write('\n')

def readint():
    return int(readln().strip())

def readints():
    return map(int, readln().split())

def readstr():
    return readln().strip()

def readstrs():
    return readln().split()

def dprint(*args):
    if debug: print(' '.join(map(str, args)))

def solve(sx,sy,xarr,yarr):
    cnts = Counter()
    for i in xrange(len(xarr)):
        xi = xarr[i]
        yi = yarr[i]
        xdf = xi - sx
        ydf = yi - sy

        if ydf > 0:
            cnts[(sx,sy+1)] += 1
        if ydf < 0:
            cnts[(sx,sy-1)] += 1
        if xdf > 0:
            cnts[(sx+1,sy)] += 1
        if xdf < 0:
            cnts[(sx-1,sy)] += 1

    (tx, ty), num = cnts.most_common(1)[0]
    return num, tx, ty 

n, sx, sy = readints()
xarr, yarr = [], []
for _ in xrange(n):
    xi, yi = readints()
    xarr.append(xi)
    yarr.append(yi)

tn, tx, ty = solve(sx,sy,xarr,yarr)
writeln(tn)
writeln("%d %d" % (tx, ty))
