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
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from collections import defaultdict
from math import factorial as f
from fractions import gcd as g

n, x, y = [int(i) for i in raw_input().split()]
dist = []
for i in range(n):
    a, b = [int(i) for i in raw_input().split()]
    dist.append((a, b))

dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]

best = 0
rx, ry = 0, 0

for h in range(4):
    X = x + dx[h]
    Y = y + dy[h]
    cnt = 0
    for (a, b) in dist:
        if abs(x - a) + abs(y - b) == abs(X - a) + abs(Y - b) + 1:
            cnt += 1
    if cnt > best:
        best = cnt
        rx, ry = X, Y
print best
print rx, ry
