#include<bits/stdc++.h>
using namespace std;
double jige;
double youxiu;
int get(double a)
{
if(a-floor(a)>=0.5)return floor(a)+1;
else return floor(a);
}
int main()
{
int n;
cin>>n;
int cnt1=0,cnt2=0;
for(int i=0;i<n;i++)
{
int x;
cin>>x;
if(x>=60&&x>=85)cnt1++,cnt2++;
else if(x>=60)cnt1++;
}
jige=100.0*cnt1/n;
youxiu=100.0*cnt2/n;
cout<<get(jige)<<'%'<<endl;
cout<<get(youxiu)<<'%'<<endl;
return 0;
}