#include <iostream>
using namespace std;
int main()
{
int N , x;
int a , b;
cin >> N;
while ( cin >> x)
{
if (x >= 10 && x <=20) a++;
else b++;
}
cout << a << " in" << endl;
cout << b << " out" << endl;
return 0;
}