#include<iostream>
using namespace std;
int main()
{
int n = 0;
cin >> n;
int x = 0, y = 0;
for(int i = 0; i < n; i++)
{
int a = 0;
cin >> a ;
if(a >= 10 && a <= 20)
{
x ++;
}
else
{
y ++;
}
}
cout << x << " in" << endl;
cout << y << " out" << endl;
return 0;
}
//一次就完成