#include <iostream>
using namespace std;
int main()
{
int n,i;
int x;
int a[100];
while (cin >> n)
{
i=0;
while (i<n)
{
cin >> a[i];
i++;
}
for (i=0;i<n;i++)
{
x=0;
x=x+a[i];
}
if (x/n>59)
{
cout << "no" << endl;
}
else
{
cout << "yes" << endl;
}
}
return 0;
}