import sys a, b = map(int, input().split()) s = [0 for _ in range(1000)] for i in range(a+1): for j in range(b+1): s[i+5*j] = 1 for i in range(1, len(s)): if s[i]: print(i)