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 maxi(l,sx,sy):
    ans = l[0]
    index = 0
    for i in range(4):
        if l[i] > ans:
            ans = l[i]
            index = i
    if index == 0:
        return ans, sx + 1, sy
    elif index == 1:
        return ans, sx, sy + 1
    elif index == 2:
        return ans, sx - 1, sy
    else:
        return ans, sx, sy - 1


n, sx, sy = [int(x) for x in input().split()]
count = {'1' : 0, '2' : 0, '3' : 0, '4' : 0, 'xplus' : 0, 'xminus' : 0, 'yplus' : 0, 'yminus' : 0}
for i in range(n):
    px, py = [int(x) for x in input().split()]
    prx = px - sx
    pry = py - sy
    if prx > 0 and pry > 0:
        count['1'] += 1
    elif prx < 0 and pry > 0:
        count['2'] += 1
    elif prx < 0 and pry < 0:
        count['3'] += 1
    elif prx > 0 and pry < 0:
        count['4'] += 1
    elif prx > 0 and pry == 0:
        count['xplus'] += 1
    elif prx < 0 and pry == 0:
        count['xminus'] += 1
    elif prx == 0 and pry > 0:
        count['yplus'] += 1
    elif prx == 0 and pry < 0:
        count['yminus'] += 1 
ans, cx, cy = maxi(
    [count['1']+count['xplus']+count['4'],
    count['1']+count['yplus']+count['2'],
    count['2']+count['xminus']+count['3'],
    count['3']+count['yminus']+count['4']],
    sx,
    sy
)
print(ans)
print(cx,cy)