A,B = map(int, input().split()) G = set() for i in range(A+1): for j in range(B+1): G.add(i+j*5) G.remove(0) G = sorted(G) for e in G: print(e)