#include<stdio.h>
int main()
{
int a[100],b,n,i,sum=0;
scanf("%d", &n);

for (i=0;i<n;i++)
{
scanf("%d", &a[i]);
}
for (i=0;i<n;i++)
{
sum = sum + a[i];
}
if (sum>=10)
{
printf("NO\n");
}

else
{
printf("YES\n");
}

return 0;
}
