N = gets.to_i weights = gets.split.map(&:to_i) dp = Array.new(10001, false) sum = 0 dp[0] = true N.times do w = weights.shift sum += w 10000.downto(0) do |i| if dp[i] dp[i + w] = true end end end if sum % 2 == 0 && dp[sum / 2] puts "possible" else puts "impossible" end