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 os, sys, atexit
from io import BytesIO, StringIO
 
input = BytesIO(os.read(0, os.fstat(0).st_size)).readline
_OUTPUT_BUFFER = StringIO()
sys.stdout = _OUTPUT_BUFFER
 
@atexit.register
def write():
    sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
n, sx, sy = [int(x) for x in input().split()]
l = 0
r = 0
t = 0
b = 0
for i in range(n):
    x, y = [int(x) for x in input().split()]
    if x < sx: l -= -1
    if x > sx: r -= -1
    if y > sy: t -= -1
    if y < sy: b -= -1
m = max(l, r, t, b)
print(m)
if m == l: print(sx - 1, sy)
elif m == r: print(sx + 1, sy)
elif m == t: print(sx, sy + 1)
else: print(sx, sy - 1)