def zent(x,s) return if($f == 1) return if(s > $s) return if(x >= $n) if(s == $s) $f = 1; return; end zent(x+1,s) s += $a[x] zent(x+1,s) end $f = 0 $n=gets.chomp.to_i $a=gets.chomp.split(" ").map(&:to_i).sort.reverse $s = $a.inject(:+) if ($s%2 == 1) puts "impossible" exit end $s = $s/2 zent(1,$a[0]) puts ($f == 1)? "possible" :"impossible"