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 sys
# sys.stdin = open("test.txt", 'r')


n, sx, sy = list(map(int, input().split()))

a = [list(map(int, input().split())) for _ in range(n)]
pairs = [0, 0, 0, 0]
for x, y in a:
    x -= sx
    y -= sy
    if x == 0:
        pairs[2*(y < 0)] += 1
    elif y == 0:
        pairs[1+2*(x > 0)] += 1
    else:
        if x > 0:
            if y > 0:
                pairs[0] += 1
            else:
                pairs[2] += 1
            pairs[3] += 1
        else:
            if y > 0:
                pairs[0] += 1
            else:
                pairs[2] += 1
            pairs[1] += 1

best = 0
bx = 0
by = 1
for (x, y), v in zip(((0, 1), (-1, 0), (0, -1), (1, 0)), pairs):
    if v > best:
        bx = x
        by = y
        best = v

print(best)
print(sx+bx, sy+by)
