import copy a, b = map(int, raw_input().split()) dic = {} for i in range(0, a + 1): if i not in dic: dic[i] = True for j in range(1, b + 1): tmp = i + j * 5 dic[tmp] = True keys = dic.keys() keys.sort() for i in keys: if i > 0: print i