if len(A)==3:
if abs(A[1]-A[2])==1:print(min(A[1],A[2]),max(A[1],A[2]),"yes")
else:
print(min(A[1],A[2]),max(A[1],A[2]),"no")
elif len(A)==4:
if A[3]+A[1]==2*A[2]:print(min(A[1],A[2],A[3]),max(A[1],A[2],A[3]),"yes")
else:
print(min(A[1],A[2],A[3]),max(A[1],A[2],A[3]),"no")
else:
#print(sum(A)-A[0]);print(min(A.remove(A[0])))
A.remove(A[0])
A.sort()
if len(A)%2==1:
if ((A[0]+A[-1])//2)*(len(A)) == sum(A):print(min(A),max(A),"yes")
else:
print(min(A),max(A),"no")
else:#偶數狀況
if (A[0]+A[-1])*(len(A)/2) == sum(A):print(min(A),max(A),"yes")
else:
print(min(A),max(A),"no")