#include <iostream>
using namespace std;
int main(void)
{
int n;
int cnt1 = 0, cnt2 = 0;
cin >> n;
while (n--) {
int x;
cin >> x;
if (x >= 10 && x <= 20) {
cnt1++;
} else {
cnt2++;
}
}
printf("%d in\n", cnt1);
printf("%d out\n", cnt2);
return 0;
}