# Тип 6 № 43583 dict1=dict() count=0 for A in range(101): for i in range(9): s = int(input()) t = int(input()) if (s > A) or (t > 11): count+=1 if count==4: dict1[A] = count count=0