import decimal o, f = map(int, input().split()) r = [] for i in range(f+1): for j in range(o+1): if i!=0 or j!=0: if 5*i+j not in r: r.append(5*i+j) r.sort() for p in r: print(p)