W, D = map(int, open(0).read().split()) for d in reversed(range(2, D + 1)): W -= W // (d * d) print(W)