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 os,io
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
n,sx,sy = list(map(int,input().split()))
d = {}
d1 = {}

if sx<10**9:
    p1 = [sx+1,sy]
    d['p1'] = p1
    d1['p1'] = 0
if sy<10**9:
    p2 = [sx,sy+1]
    d['p2'] = p2
    d1['p2'] = 0
if sx>0:
    p3 = [sx-1,sy]
    d['p3'] = p3
    d1['p3'] = 0
if sy>0:
    p4 = [sx,sy-1]
    d['p4'] = p4
    d1['p4'] = 0

for i in range(n):
    x,y = list(map(int,input().split()))
    d3 = {}
    mv = 0
    s = ''
    for i in d:
        pd = abs(x-d[i][0])+abs(y-d[i][1])
        d3[i] = pd
    mv = min(d3.values())
    for i in d3:
        if d3[i]==mv:
            d1[i]+=1

mv = max(d1.values())
print(mv)
for i in d1:
    if d1[i]==mv:
        print(*d[i])
        break