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 math
ar = []
studX = []
studY = []
for x in input().split(' '):
    ar.append(int(x))
up = 0
down = 0
right = 0
left = 0
for x in range(ar[0]):
    temp = []
    for y in input().split(' '):
        temp.append(int(y))
    if ar[1] == temp[0]:
        if ar[2] > temp[1]:
            left = left + 1
        else:
            right = right + 1
    elif ar[2] == temp[1]:
        if ar[1] > temp[0]:
            up = up + 1
        else:
            down = down + 1
    elif temp[0] > ar[1] and temp[1] > ar[2]:
        down = down + 1
        right = right + 1
    elif temp[0] < ar[1] and temp[1] < ar[2]:
        up = up + 1
        left = left + 1
    elif temp[0] > ar[1] and temp[1] < ar[2]:
        down = down + 1
        left = left + 1
    elif temp[0] < ar[1] and temp[1] > ar[2]:
        up = up + 1
        right = right + 1
temp = max(up, down, left, right)
if temp == up:
    print(up)
    print(ar[1]-1, ar[2])
elif temp == down:
    print(down)
    print(ar[1] + 1, ar[2])
elif temp == left:
    print(left)
    print(ar[1], ar[2]-1)
elif temp == right:
    print(right)
    print(ar[1], ar[2]+1)
