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