def compose(m: list[int]): c = len(m) if c < 2: return a, b = m[0:1], m[1:] yield a, b if c == 2: return for sa, sb in compose(b): yield a + sa, sb yield a + sb, sa def main(): n = int(input()) if n == 0: return True m = map(int, input().split()) a, b, c = [], [], [] for x in m: (a if x % 5 == 0 else b if x % 3 == 0 else c).append(x) d = abs(sum(a) - sum(b)) if d == 0 and sum(c) == 0: return True for sa, sb in compose(c): if d == abs(sum(sa) - sum(sb)): return True return False print("true" if main() else "false")