from os import sep
import sys
def seprate(lst,a,b):
if not lst:
if a == b:
return True
else:
return False
else:
temp = lst.pop()
return seprate(lst[:],a+temp,b) or seprate(lst[:],a,b+temp)
while True:
try:
n = int(input())
arr = list(map(int,input().split()))
lst5 = []
lst3 = []
lst = []
for x in arr:
if x%5 == 0:
lst5.append(x)
elif x%3 == 0:
lst3.append(x)
else:
lst.append(x)
if seprate(lst,sum(lst5),sum(lst3)):
print('true')
else:
print('false')
except:
break

京公网安备 11010502036488号