using System; using System.Collections.Generic; using System.Linq; public class Program { public static void Main() { int N = int.Parse(Console.ReadLine()); int[] W = Console.ReadLine().Split().Select(int.Parse).ToArray(); if (W.Sum() % 2 == 1) { Console.WriteLine("impossible"); return; } int target = W.Sum() / 2; var flg = new bool[N + 1]; flg[0] = true; var q = new Queue(); q.Enqueue(0); for (int i = 0; i < N; i++) { int len = q.Count; for (int j = 0; j < len; j++) { var t = q.Dequeue(); q.Enqueue(t); q.Enqueue(t + W[i]); } } Console.WriteLine(q.Any(i => i == target) ? "possible" : "impossible"); } }