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