n=int(input()) w=list(map(int,input().split())) if sum(w)%2!=0: print("impossible") else: w_i=sum(w)//2 weight=set([0]) w.sort() while 0