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
from copy import copy


def arr_float_inp():
    return [float(s) for s in input().split()]


def arr_int_inp():
    return [int(s) for s in input().split()]


def int_inp():
    return int(input())


def float_inp():
    return float(input())


def comp(a):
    return a[0]


if __name__ == '__main__':
    n, sh_x, sh_y = arr_int_inp()
    a = [arr_int_inp() for i in range(n)]
    up = []
    left = []
    down = []
    right = []
    for i in range(n):
        x = a[i][0] - sh_x
        y = a[i][1] - sh_y
        if x >= 0 and y >= 0:
            if abs(x) > abs(y):
                right.append(a[i])
            elif abs(y) > abs(x):
                up.append(a[i])
            else:
                right.append(a[i])
                up.append(a[i])
        elif x <= 0 and y >= 0:
            if abs(x) > abs(y):
                left.append(a[i])
            elif abs(y) > abs(x):
                up.append(a[i])
            else:
                left.append(a[i])
                up.append(a[i])
        elif x <= 0 and y <= 0:
            if abs(x) > abs(y):
                left.append(a[i])
            elif abs(y) > abs(x):
                down.append(a[i])
            else:
                left.append(a[i])
                down.append(a[i])
        elif x >= 0 and y <= 0:
            if abs(x) > abs(y):
                right.append(a[i])
            elif abs(y) > abs(x):
                down.append(a[i])
            else:
                right.append(a[i])
                down.append(a[i])

    up = [len(up), [0, 1], up]
    down = [len(down), [0, -1], down]
    left = [len(left), [-1, 0], left]
    right = [len(right), [1, 0], right]

    out = sorted([up, down, left, right], key=comp)
    print(out[-1][0])
    sh_x += out[-1][1][0]
    sh_y += out[-1][1][1]
    print(sh_x, sh_y)
