W = int(input()) D = int(input()) for i in range(2,D+1)[::-1]: W -= W//(i**2) print(W)