N = int(input()) A = list(map(int,input().split())) A = sorted(A) if len(A)%2==0: print((A[int(len(A)/2-1)]+A[(int(len(A)/2))])/2) else: print((A[int((len(A)-1)/2)])) print(len(A),A)