#include <bits/stdc++.h>
using namespace std;
int main(){
    int n,a[1000],i,c1=0,c2=0,c3=0;
    cin>>n;
    for(i = 1;i <= n;i++){
    	cin>>a[i];
    	if(a[i] == 90) c1++;
    	else if(a[i] < 90) c2++;
    	else if(a[i] > 90) c3++;
	}
	cout<<c1<<" "<<c2<<" "<<c3;
    return 0;
}
/**************************************************************
	Problem: 1804
	User: admin
	Language: C++
	Result: Accepted
	Time:10 ms
	Memory:2072 kb
****************************************************************/