c = 0
for i in range(10, 100):
if (str(i)[-1] == "7" or str(i)[-1] == "5") and i % 3 == 0:
c += 1
print(c)
c = 0
for i in range(10, 100):
if (str(i)[-1] == "7" or str(i)[-1] == "5") and i % 3 == 0:
c += 1
print(c)