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 collections import defaultdict


def sign(x):
    if x == 0:
        return 0
    elif x < 0:
        return -1
    else:
        return 1


if __name__ == '__main__':
    n, sx, sy = map(int, input().split(' '))
    ht_pos = defaultdict(list)
    for _ in range(n):
        x, y = map(int, input().split(' '))
        ht_pos[(sign(x - sx), sign(y - sy))].append((x, y))

    max_key = (1, 0)
    max_key_len = -1
    for key in [(1, 0), (-1, 0)]:
        x = key[0]
        if len(ht_pos[(x, 1)]) + len(ht_pos[(x, -1)]) + len(ht_pos[(x, 0)]) > max_key_len:
            max_key_len = len(ht_pos[(x, 1)]) + len(ht_pos[(x, -1)]) + len(ht_pos[(x, 0)])
            max_key = key

    for key in [(0, 1), (0, -1)]:
        y = key[1]
        if len(ht_pos[(1, y)]) + len(ht_pos[(-1, y)]) + len(ht_pos[(0, y)]) > max_key_len:
            max_key_len = len(ht_pos[(1, y)]) + len(ht_pos[(-1, y)]) + len(ht_pos[(0, y)])
            max_key = key

    if max_key in ((1, 0), (-1, 0)):
        x = max_key[0]
        if x == 1:
            x_min = float('inf')
            for y in (0, 1, -1):
                c = [xy[0] for xy in ht_pos[(x, y)]]
                c.append(x_min)
                x_min = min(c)
        else:
            x_min = float('-inf')
            for y in (0, 1, -1):
                c = [xy[0] for xy in ht_pos[(x, y)]]
                c.append(x_min)
                x_min = max(c)
        print(max_key_len)
        print(x_min, sy)
    else:
        y = max_key[1]
        if y == 1:
            y_min = float('inf')
            for x in (0, 1, -1):
                c = [xy[1] for xy in ht_pos[(x, y)]]
                c.append(y_min)
                y_min = min(c)
        else:
            y_min = float('-inf')
            for x in (0, 1, -1):
                c = [xy[1] for xy in ht_pos[(x, y)]]
                c.append(y_min)
                y_min = max(c)
        print(max_key_len)
        print(sx, y_min)



