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
import sys
from atexit import register
from io import BytesIO
sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))
input = lambda: sys.stdin.readline().rstrip('\r\n')
raw_input = lambda: sys.stdin.readline().rstrip('\r\n')

n,sx,sy = map(int,raw_input().split(" "))
locs = []
for i in range(n):
    x,y = map(int,raw_input().split(" "))
    locs.append((x-sx,y-sy))

cands = [(0,1),(1,0),(0,-1),(-1,0)]
cnts = [0]*4
for i in range(n):
    x,y = locs[i]
    for i,c in enumerate(cands):
        a,b  = c
        if abs(x-a)+abs(y-b)+1 == abs(x)+abs(y):
            cnts[i] += 1
ans = max(cnts)
print ans
for i in range(4):
    if cnts[i] == ans:
        a,b = cands[i]
        print sx+a,sy+b 
        break






