#include <bits/stdc++.h>
using namespace std;
int main(){
int arr[1000],n,i,a = 0,b = 0,c = 0,d = 0;
cin>>n;
for(i = 0;i < n;i++){
cin>>arr[i];
if(arr[i] <= 18){
a++;
}else if(arr[i] <= 35){
b++;
}else if(arr[i] <= 60){
c++;
}else{
d++;
}
}
cout<<a<<" "<<fixed<<setprecision(2)<<a*100.0/n<<"%"<<endl;
cout<<b<<" "<<fixed<<setprecision(2)<<b*100.0/n<<"%"<<endl;
cout<<c<<" "<<fixed<<setprecision(2)<<c*100.0/n<<"%"<<endl;
cout<<d<<" "<<fixed<<setprecision(2)<<d*100.0/n<<"%"<<endl;
}
/**************************************************************
Problem: 1426
User: yangjunwen
Language: C
Result: Compile Error
****************************************************************/