include<stdio.h>

include<math.h>

int judge(int i,int n,int *v,int sum1,int sum2)
{
if(i==n)
return abs(sum1)==sum2?1:0;
else
return judge(i+1,n,v,sum1+v[i],sum2)||judge(i+1,n,v,sum1-v[i],sum2);
}

int main()
{
int num;
while(scanf("%d",&num) != EOF)
{
int a[100],b[100];
int flag,i,k=0;
for(i=0;i<num;i++)
{
scanf("%d",&a[i]);
}
int sum1 = 0;
int sum2 = 0;
int sum3 = 0;
for(i=0;i<num;i++)
{
if(a[i] > 0 && a[i] % 5 == 0)
{
sum1 += a[i];
}
else if(a[i] > 0 && a[i] % 3 == 0)
{
sum2 += a[i];
}
else
{
sum3 += abs(a[i]);
b[k] = a[i];
k++;
}
}
if(sum3 >=abs(sum1-sum2) && (sum3-abs(sum1-sum2)) % 2 == 0)
{
flag=judge(0,k,&b,0,abs(sum1-sum2));
if(flag)
{
printf("true\n");
}
else
{
printf("false\n");
}
}
else
{
printf("false\n");
}
}
}