#include<cstdio>
#include<iostream>
using namespace std;
int main()
{
int n,t,i=0,o=0;
cin>>n;
while(n>0)
{
cin>>t;
if(t>=10&&t<=20) i++;
else o++;
n--;
}
cout<<i<<' '<<"in"<<endl;
cout<<o<<' '<<"out"<<endl;
}