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(i) for i in input().split()]
l = []
for i in range(n):
    l.append([int(j) for j in input().split()])
q1 = 0
q2 = 0
q3 = 0
q4 = 0
for i in l:
    if i[0]<=sx and i[1]>=sy:
        q1+=1
    if i[0]>=sx and i[1]>=sy:
        q2+=1
    if i[0]>=sx and i[1]<=sy:
        q3+=1
    if i[0]<=sx and i[1]<=sy:
        q4+=1
x1 = 0
y1 = 0
x2 = 0
y2 = 0
for i in l:
    if i[1]==sy and i[0]<=sx:
        x1+=1
    if i[0]==sx and i[1]<=sy:
        y1+=1
    if i[1]==sy and i[0]>=sx:
        x2+=1
    if i[0]==sx and i[1]>=sy:
        y2+=1
temp = max(q1+q2, q2+q3, q3+q4, q4+q1)
if temp==q1+q2:
    print(q1 + q2 - x1 -x2- y2)
    print(sx, sy+1)
elif temp==q2+q3:
    print(q3 + q2 - y1 -y2- x2)
    print(sx+1, sy)
elif temp==q3+q4:
    print(q3 + q4 - x1 -x2- y2)
    print(sx, sy-1)
else:
    print(q1 + q4 - y1 -y2- x1)
    print(sx-1, sy)