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
# ":"
n, sx, sy = [int(i) for i in input().split()]
lis = []
for _ in range(n):
    x, y = [int(i) for i in input().split()]
    lis.append([x, y])
down_left_right = 0
up_left_right = 0
right_top_down = 0
left_top_down = 0
for i in range(n):
    a, b = lis[i]
    if a > sx:
        right_top_down += 1
        if b > sy:
            up_left_right += 1
        elif b < sy:
            down_left_right += 1
    elif a < sx:
        left_top_down += 1
        if b > sy:
            up_left_right += 1
        elif b < sy:
            down_left_right += 1
    elif a == sx:
        if b > sy:
            up_left_right += 1
        elif b < sy:
            down_left_right += 1
m1 = down_left_right
m2 = up_left_right
m3 = left_top_down
m4 = right_top_down
ma = max(m1, m2, m3, m4)
if ma == m1:
    print(ma)
    print(sx, sy-1)
elif ma == m2:
    print(ma)
    print(sx, sy+1)
elif ma == m3:
    print(ma)
    print(sx-1, sy)
elif ma == m4:
    print(ma)
    print(sx+1, sy)
