#include<iostream>
using namespace std;
const int N=1e4+5;
int n,a[N],ans1,ans2;
int main(){
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];
if(a[i]>=60) ans1++;
if(a[i]>=85) ans2++;
}
printf("%.0lf%\n",(double)100*ans1/n);
printf("%.0lf%\n",(double)100*ans2/n);
return 0;
}