using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace procon { public class Program { public static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var inputs = Console.ReadLine().Split().Select(int.Parse).ToArray(); var weight_half = inputs.Sum() / 2; var stack = new Stack(); var pos = 0; while (pos < n) { for (int i = pos; i < n; i++) { stack.Push(i); var sum = stack.Select(index => inputs[index]).Sum(); if (sum > weight_half) { pos = stack.Pop() + 1; break; } else if (sum == weight_half) { // 到達 Console.WriteLine("possible"); Console.Out.Flush(); return; } } } Console.WriteLine("impossible"); Console.Out.Flush(); } } }