age = int(input())
if age <= 4:
print('free')
elif age <= 14:
print('5$')
else:
print('10$')
age = input()
if age.isdigit() and int(age) <= 4:
print('free')
elif age.isdigit() and int(age) <= 14:
print('5$')
else:
print('10$')