n=input() cnt1=0 cnt2=0 while n: n-=1 x=input() if x < 10 or x > 20: cnt1+=1 else: cnt2+=1 print('%d in\n%d out'%(cnt2,cnt1))