program main implicit none integer::N,i,j,total=0 integer::W(100)=0 logical::is_possible(0:10000)=.false. read *, N, W(1:N) is_possible(0)=.true. do i=1,N total = total + W(i) do j=0, total if(is_possible(j)) then is_possible(j+W(i)) = .true. endif end do end do if((MOD(total,2).eq.1) .or. (is_possible(total/2).eqv..false.)) then print '(a)','impossible' else print '(a)','possible' endif end program main