#include <cstdio>
using namespace std;
int main(){
int n,x,count1=0,count2=0;
scanf("%d",&n);
while(n--){
scanf("%d",&x);
if(x>=10&&x<=20)
count1++;
else
count2++;
}
printf("%d in\n%d out",count1,count2);
return 0;
}