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