PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000085. Chia N thành K số với BCNN nhỏ (k-LCM (hard version))

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Chia N thành K số với BCNN nhỏ (k-LCM (hard version))

k-LCM (hard version)

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

Given positive integers nn and kk, construct exactly kk positive integers a1,…,aka_1,\ldots,a_k summing to nn and with LCM at most n/2n/2. A valid construction is always possible; output any valid one. This Phuoc Hung OJ single-instance version limits the number of printed integers to 10510^5.

Input

One line containing nn and kk.

Output

Print exactly kk positive integers separated by spaces, summing to nn and having LCM at most n/2n/2.

Subtasks

  • Subtask 1 (20 points): 3≤n≤1003\le n\le100, 3≤k≤min⁡(n,20)3\le k\le\min(n,20).

  • Subtask 2 (30 points): 3≤n≤1063\le n\le10^6, 3≤k≤min⁡(n,103)3\le k\le\min(n,10^3).

  • Subtask 3 (50 points): 3≤n≤1093\le n\le10^9, 3≤k≤min⁡(n,105)3\le k\le\min(n,10^5).

Examples

Input

9 5

Output

1 1 1 3 3

Explanation

There are exactly five positive numbers summing to 1+1+1+3+3=91+1+1+3+3=9. Their LCM is 33, satisfying 3≤9/23\le9/2.