import sys from collections import defaultdict def main(): N = int(sys.stdin.readline()) A = list(map(int, sys.stdin.readline().split())) total_mask = (1 << N) - 1 dp = defaultdict(set) for i in range(N): mask = 1 << i dp[mask].add(A[i]) # Generate masks in order of increasing number of bits masks = [] for mask in range(1, 1 << N): cnt = bin(mask).count('1') masks.append((cnt, mask)) masks.sort() for cnt, mask in masks: s = (mask - 1) & mask while s > 0: t = mask ^ s if s < t: # Avoid processing the same pair twice if s in dp and t in dp: for a in dp[s]: for b in dp[t]: # Addition dp[mask].add(a + b) # Multiplication dp[mask].add(a * b) # Subtraction dp[mask].add(a - b) dp[mask].add(b - a) # Division if b != 0 and a % b == 0: dp[mask].add(a // b) if a != 0 and b % a == 0: dp[mask].add(b // a) s = (s - 1) & mask # Check all possible splits of the full set for s in range(1, total_mask): t = total_mask ^ s if s > t: continue if s not in dp or t not in dp: continue if dp[s] & dp[t]: print("YES") return print("NO") if __name__ == "__main__": main()