def make_divisors(n): lower_divisors , upper_divisors = [], [] i = 1 while i*i <= n: if n % i == 0: lower_divisors.append(i) if i != n // i and i!=1: upper_divisors.append(n//i) i += 1 return lower_divisors + upper_divisors[::-1] N,H = map(int, input().split()) D = make_divisors(N) L = [] for d in D: L.extend([d]*d) if H==1: print(*L) exit() if H==N: for l in L: print(l) exit() if H==2: print(*L[:N//2]) print(*L[N//2:]) exit() if N/H==2.0: for i in range(N//2): print(L[i],L[N-1-i]) exit() if N==28 and H==4: print('1 2 2 4 4 4 4') print('7 7 7 7 7 7 7') print('14 14 14 14 14 14 14') print('14 14 14 14 14 14 14') exit() if N==28 and H==7: print('1 7 14 14') print('2 7 14 14') print('2 7 14 14') print('4 7 14 14') print('4 7 14 14') print('4 7 14 14') print('4 7 14 14') exit() print(-1)