use std::io::{self, BufRead}; fn main() { let input = io::stdin() .lock() .lines() .map(|l| { l.unwrap() .split(' ') .map(|n| n.parse::().unwrap()) .collect::>() }) .collect::>(); let sum = input[1].iter().sum::(); if sum % 2 == 1 { println!("impossible"); } else { let n = input[1].len(); let goal = sum / 2; let mut possible = vec![vec![false; goal + 1]; n + 1]; possible[0][0] = true; for i in 1..=n { for total in 0..=goal { possible[i][total] |= possible[i - 1][total]; if input[1][i - 1] <= total { possible[i][total] |= possible[i - 1][total - input[1][i - 1]]; } } } println!("{}possible", if possible[n][goal] { "" } else { "im" }); } }