题目链接:https://codeforces.com/contest/1095/problem/C
#include<bits/stdc++.h>
using namespace std;
int a[200005];
int main()
{
int n,k;
while(cin>>n>>k)
{
fill(a+1,a+1+k,1);
int temp=k;
for(int i=1;i<=k;i++)
{
while(temp+a[i]<=n)
{
temp+=a[i];
a[i]*=2;
}
}
if(temp!=n)
cout<<"NO"<<endl;
else
{
cout<<"YES"<<endl;
for(int i=1;i<=k;i++)
{
if(i==k)
cout<<a[i]<<endl;
else
cout<<a[i]<<" ";
}
}
}
return 0;
}