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=list(map(int,input().split()))
x =[];y = []
for i in range(n):
    a = list(map(int,input().split()))
    x.append(a[0])
    y.append(a[1])
#找到最靠近学校的点，将学校作为原点，找出点最多的象限，再以最靠近学校的点以及学校之间的范围作为tent建立的范围
count = [0,0,0,0]
px = False;py = False
if max(x) != sx and min(x) != sx:px = True
if max(y) != sy and min(y) != sy:py=True
for i in range(n):
    if x[i] > sx and px:
        count[0]+=1
    if x[i] < sx and px:
        count[1]+=1
    if y[i] > sy and py:
        count[2]+=1
    if y[i] < sy and py:
        count[3]+=1

print(max(count))
if count.index(max(count)) == 0:
    print(f"{sx+1} {sy}")
elif count.index(max(count)) == 1:
    print(f"{sx-1} {sy}")
elif count.index(max(count)) ==2:
    print(f"{sx} {sy+1}")
else:
    print(f"{sx} {sy-1}")

#学生全部住在坐标系上为一种情况，