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 sys import stdin, stdout
import math
import heapq
import collections
input = stdin.readline
def inputnum():
    return(int(input()))
def inputnums():
    return(map(int,input().split()))
def inputlist():
    return(list(map(int,input().split())))
def inputstring():
    return([x for x in input()])
def inputstringnum():
    return([ord(x)-ord('a') for x in input()])
def inputmatrixchar(rows):
    arr2d = [[j for j in input().strip()] for i in range(rows)] 
    return arr2d
def inputmatrixint(rows):
    arr2d = []
    for _ in range(rows):
        arr2d.append([int(i) for i in input().split()])
    return arr2d
    
n, sx, sy = inputnums()
N = 0
S = 0
E = 0
W = 0
for i in range(n):
    l = [int(x) for x in input().split(' ')]
    if l[1] > sy:
        N += 1 
    elif l[1] < sy:
        S += 1
    if l[0] > sx:
        E += 1 
    elif l[0] < sx:
        W += 1 
mx = max([N, S, E, W])
print(mx)
if N == mx:
    print(sx, sy+1)
elif S == mx:
    print(sx, sy-1)
elif E == mx:
    print(sx+1, sy)
else:
    print(sx-1, sy)