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 sys
import collections
import heapq
import math
import bisect
 
input = sys.stdin.readline
 
def rints(): return map(int, input().strip().split())
def rstr(): return input().strip()
def rint(): return int(input().strip())
def rintas(): return [int(i) for i in input().strip().split()]
    
def gcd(a, b):       
    if (b == 0): 
         return a 
    return gcd(b, a%b) 

n, x, y = rints()
a, b, c, d = 0, 0, 0, 0

for _ in range(n):
    u, v = rints()
    if u < x:
        a += 1
    elif u > x:
        b += 1
    if v < y:
        c += 1
    elif v > y:
        d += 1

mx = max(a, b, c, d)
print(mx)
if mx == a:
    print(x-1, y)
elif mx == b:
    print(x+1, y)
elif mx == c:
    print(x, y-1)
else:
    print(x, y+1)

