import java.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Scanner; class Main { public static void main(String[] args) { new Main().run(); } ArrayList[][] dp; // [left,right] ArrayList rec(int left, int right, int[] A, int[] ord) { if (dp[left][right].size() != 0) { return dp[left][right]; } if (right - left == 0) { dp[left][right].add((double) A[ord[left]]); return dp[left][right]; } ArrayList ret = new ArrayList<>(); for (int i = left; i < right; ++i) { ArrayList lv = rec(left, i, A, ord); ArrayList rv = rec(i + 1, right, A, ord); for (double v1 : lv) { for (double v2 : rv) { ret.add(v1 + v2); ret.add(v1 - v2); if (Math.abs(v1 + v2) < 1e-6 || Math.abs(v1 - v2) < 1e-6) { System.out.println("YES"); System.exit(0); } if (v2 != 0) { ret.add(v1 / v2); } ret.add(v1 * v2); } } } dp[left][right] = ret; return ret; } void run() { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] A = new int[N]; for (int i = 0; i < N; ++i) { A[i] = sc.nextInt(); } int[] ord = new int[N]; for (int i = 0; i < ord.length; ++i) { ord[i] = i; } // permutationの状態数は5040通り。 do { dp = new ArrayList[N][N]; for (int i = 0; i < N; ++i) { for (int j = 0; j < N; ++j) { dp[i][j] = new ArrayList<>(); } } ArrayList tmp = rec(0, N - 1, A, ord); if (Math.abs(tmp.get(0)) < 1e-6) { System.out.println("YES"); return; } } while (nextPermutation(ord)); System.out.println("NO"); } boolean nextPermutation(int[] ord) { int n = ord.length; int i = n - 1; while (i - 1 >= 0 && ord[i - 1] > ord[i]) { --i; } if (i == 0) return false; int j = i; while (j + 1 < n && ord[i - 1] < ord[j + 1]) { ++j; } int tmp = ord[i - 1]; ord[i - 1] = ord[j]; ord[j] = tmp; int s = i; int t = n - 1; while (t - s > 0) { tmp = ord[t]; ord[t] = ord[s]; ord[s] = tmp; ++s; --t; } return true; } void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }