#include <iostream>
int main()
{
int N,count_x=0;
std::cin>>N;
int array[N];
for(int i=0;i<N;i++)
std::cin>>array[i];
for(int j=0;j<N;j++)
if(array[j]>=10 && array[j]<=20) count_x++;
printf("%d in\n",count_x);
printf("%d out\n",N-count_x);
return 0;
}