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