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
(n, sx, sy) = [int(x) for x in input().split()]
# res={}
# for i in range(n):
#     (px, py) = [int(x) for x in input().split()]
#     for x in range(min(sx,px), max(sx,px)+1):
#         for y in range(min(sy,py), max(sy,py)+1):
#             res[(x,y)] = res.get((x,y),0) + 1            
# 
# del res[(sx, sy)]
# 
# mx = 0;
# r =(-1,-1)
# for k,v in res.items():
#     if v > mx:
#         mx=v
#         r=k
# 
# print(mx)
# print(r[0], r[1])
u = 0
d = 0
l = 0
r = 0

for i in range(n):
   (px, py) = [int(x) for x in input().split()]
   if px > sx:
       r +=1
   elif px < sx:
       l +=1
   if py > sy:
       u +=1
   elif py < sy:
       d +=1    

if u >= d and u >= l  and u >= r:
    print(u)
    print(sx,sy+1)

elif d >= u  and d >= l  and d >= r:
    print(d)
    print(sx,sy-1)

elif l >= u and l >= d  and l>= r:
    print(l)
    print(sx-1, sy)

else:
    print(r)
    print(sx+1, sy)