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 math
import sys
#from collections import deque, Counter, OrderedDict, defaultdict
#import heapq
#ceil,floor,log,sqrt,factorial,pow,pi,gcd
#import bisect
#from bisect import bisect_left,bisect_right
input = sys.stdin.readline
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input().strip()
    return(list(s[:len(s)]))
def invr():
    return(map(int,input().split()))
n,sx,sy=invr()
l=[]
for i in range(n):
    a,b=invr()
    l.append([a,b])
left,right,up,down=0,0,0,0
for each in l:
    a,b=each
    if a>sx:
        right+=1
    if a<sx:
        left+=1
    if b>sy:
        up+=1
    if b<sy:
        down+=1
s=max(left,right,up,down)
print(s)
if s==right:
    print(sx+1,sy)
elif s==left:
    print(sx-1,sy)
elif s==up:
    print(sx,sy+1)
elif s==down:
    print(sx,sy-1)

