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])

    l_u = len(up)
    l_d = len(down)
    l_l = len(left)
    l_r = len(right)
    out = []
    out_x, out_y = sh_x, sh_y
    if l_u >= l_d and l_u >= l_l and l_u >= l_r:
        out = up
        out_y += 1
    elif l_d >= l_u and l_d >= l_r and l_d >= l_l:
        out = down
        out_y -= 1
    elif l_l >= l_u and l_l >= l_d and l_l >= l_r:
        out = left
        out_x -= 1
    else:
        out = right
        out_x += 1

    print(len(out))
    print(out_x, out_y)
