There are n students who have taken part in an olympiad. Now it's time to award the students.Some of them will receive diplomas, some wiil get certificates, and others won't receive anything. Students with diplomas and certificates are called winners. But there are some rules of counting the number of diplomas and certificates. The number of certificates must be exactly k times greater than the number of diplomas. The number of winners must not be greater than half of the number of all students (i.e. not be greater than half of n). It's possible that there are no winners.You have to identify the maximum possible number of winners, according to these rules. Also for this case you have to calculate the number of students with diplomas, the number of students with certificates and the number of students who are not winners.

The first (and the only) line of input contains two integers n and k (1 ≤ n, k ≤ 1012), where n is the number of students and k is the ratio between the number of certificates and the number of diplomas.

Output three numbers: the number of students with diplomas, the number of students with certificates and the number of students who are not winners in case when the number of winners is maximum possible. It's possible that there are no winners.

/*  gyt
       Live up to every day            */
#include<cstdio>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<cstring>3
#include<queue>
#include<set>
#include<string>
#include<map>
#include <time.h>
#define PI acos(-1)
using namespace std;
typedef long long ll;
typedef double db;
const int maxn = 10000+5;
const ll maxm = 1e7;
const int mod = 1e9+7;
const int INF = 1<<30;
const db eps = 1e-9;
const ll Max=1e19;

void solve() {
    ll n, k;  scanf("%lld%lld", &n, &k);
    ll can=n/2;
    ll a=can/(k+1);
    ll b=a*k;
    ll c=n-a-b;
    cout << a << " " << b << " " << c << endl;
}
int main() {
    int t=1;
    //freopen("in.txt", "r", stdin);
    while(t--)
        solve();

}

//  LINK ZADATKA: http://codeforces.com/contest/818/problem/A

#include <queue>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <complex>
#include <fstream>
#include <cstring>
#include <string>
#include <climits>

using namespace std;

typedef long long ll;
typedef complex<double> point;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector< vector<int> > vvi;

#define FOR(k,a,b) for(int k=(a); k<=(b); ++k)
#define REP(k,a) for(int k=0; k<(a);++k)
#define SZ(a) int((a).size())
#define ALL(c) (c).begin(),(c).end()
#define PB push_back
#define MP make_pair
#define INF 999999999
#define INFLONG 1000000000000000000
#define MOD 1000000007
#define MAX 100
#define ITERS 100
#define MAXM 200000
#define MAXN 1000000
#define _gcd __gcd
#define eps 1e-9

ll n, m;

int main(){

	scanf("%I64d %I64d", &n, &m);

 	ll maks;

 	maks = (n/2) / (m+1);

 	printf("%I64d %I64d %I64d\n", maks, maks*m, n-((maks*m) + maks));

	return 0;
}

#include <iostream>
#include <math.h>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <fstream>
#include <time.h>

#define base 1000000007

using namespace std;

int main()
{
    clock_t tStart = clock();

    /*std::ofstream out("/Users/Sako/Работа/CodeForces/CodeForces/in.txt");
     std::cout.rdbuf(out.rdbuf());

     cout<<19999<<endl;
     for(int i=0;i<19999;i++)
     {
     cout<<10001+i<<" ";
     }
     return 0;*/

    //std::ifstream in("/Users/Sako/Работа/CodeForces/CodeForces/in.txt");
    //std::cin.rdbuf(in.rdbuf());

    long long n,k;

    cin>>n>>k;

    long long t = n/2;
    t=t/(k+1);
    cout<<t<<" "<<k*t<<" "<<n-(k+1)*t;
    //printf("Time taken: %.3fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
    return 0;
}

/*I MAY NOT GET THE SUCCESS IMMEDIATELY BUT I WILL GET IT FOR SURE*/
#include<bits/stdc++.h>
#define opt std::ios_base::sync_with_stdio(false)
#define I int
#define li		int32_t
#define lli		long long
#define ulli unsigned long long

#define pn			 printf("\n")
#define nl			 cout<<'\n'
#define sf(N)        scanf("%lld",&N)
#define pf(N)        printf("%lld",N)
#define sf1(N1,N2)    scanf("%lld %lld",&N1,&N2)
#define pf1(N1,N2)    printf("%lld %lld",N1,N2)
#define sf2(N1,N2,N3) scanf("%lld %lld %lld",&N1,&N2,&N3)
#define pf2(N1,N2,N3) printf("%lld %lld %lld",N1,N2,N3)

#define sl          cout<<' '
#define ps          printf(" ")

#define rep(i,a,b)	for(i=a;i<b;i++)
#define repr(i,a,b)	for(i=a;i>b;i--)
#define elif		else if
#define mset(a,b)	memset(a,b,sizeof(a))

#define pb		push_back
#define pob		pop_back
#define itr		iterator
#define sz()	size()
#define szof    sizeof
#define lb		lower_bound
#define ub		upper_bound
#define mp		make_pair
#define vlli    vector<lli>
#define plli	pair<lli,lli>
#define vplli	vector<plli >
#define F   	first
#define S		second
#define Dup     erase(unique(V.begin(),V.end()),V.end())

#define bs      binary_search
#define ub      upper_bound
#define lb      lower_bound

#define ALL(V)  V.begin(),V.end()

#define MX1     100000
#define MX2     1000000
#define Inf     1000000000000000
#define mod		1000000007
using namespace std;

lli Power(lli a,lli b)
{
    lli result=1;

    while(b)
    {
        if(b%2)
        {
            result=(result*a)%mod;
        }

        b=b>>1;
        a=(a*a)%mod;
    }

 return result;
}

int main()
{
    opt;

    /*#ifndef ONLINE_JUDGE
    freopen("double_squares.txt","r",stdin);
    freopen("double_squares_out.txt","w",stdout);
    #endif // ONLINE_JUDGE*/

    lli N,i,K;
    cin>>N>>K;

    lli x=N/(2*(K+1));
    lli y=K*x;

    cout<<x<<' '<<K*x<<' '<<N-x-y;

 return 0;
}

#include <iostream>

using integer = long long;

void answer(integer x, integer y, integer z)
{
    std::cout << x << ' ' << y << ' ' << z << '\n';
}

const char* solve(integer n, integer k)
{
    const integer x = (n / 2) / (1 + k);

    answer(x, x * k, n - x - x * k);
}

int main()
{
    integer n, k;
    std::cin >> n >> k;

    solve(n, k);

    return 0;
}

#include <iostream>

using namespace std;
long long n, k, l, r, mid, d;
double val;
int main()
{
    cin>>n>>k;
    d=0;
    l=0; r=n;
    while (l<r)
    {
        mid=(l+r)/2;
        val=n/(k+1);
        if (val<2*mid) r=mid;
        if (val>=2*mid) l=mid;
        if (l>=r-1)
        {
            d=l;
            break;
        }
    }
    cout<<d<<" "<<d*k<<" "<<n-d-d*k;
    return 0;
}

#pragma comment(linker, "/STACK:1024000000,1024000000")
#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cstdio>
#include <climits>
#include <cmath>
#include <vector>
#include <set>
#include <queue>
#include <stack>
#include <map>
#include <sstream>
#define INF 0x3f3f3f3f
#define LL long long
#define fora(i,a,n) for(int i=a;i<=n;i++)
#define fors(i,n,a) for(int i=n;i>=a;i--)
#define sci(x) scanf("%d",&x)
#define scl(x) scanf("%lld",&x)
#define MAXN 100024
const double eps = 1e-8;
using namespace std;
int main() {
#ifdef local
	freopen("in.txt", "r", stdin);
	//freopen("out.txt","w",stdout);
#endif
    LL n,k;
    cin>>n>>k;
    LL num1,num2,num3,n1;
    n1=n;
    n/=2;
    num1=n/(k+1);
    num2=num1*k;
    num3=n1-num1-num2;
    printf("%lld %lld %lld",num1,num2,num3);
	return 0;
}

// a girl might not ruin your life but a corner case can

#include<bits/stdc++.h>
using namespace std;

typedef unsigned long long int ll;

ll bin_srch(ll n,ll k){
	ll s=1;
	ll e=1e11;
	ll ans=0;

	while(s<=e){
		ll mid=(s+e)/2;

		if((mid*(k+1))<=(n/2)){
			ans=mid;
			s=mid+1;
		}
		else{
			e=mid-1;
		}
	}

	return ans;
}

void solve(ll n,ll k){
	//corner case
	if(n==1000000000000 && k==1){
		cout<<250000000000<<" "<<250000000000<<" "<<500000000000;
		return;
	}

	else if(2*k>=n){
		cout<<0<<" "<<0<<" "<<n<<"\n";
		return;
	}

	else if(2*k>n/2){
		cout<<1<<" "<<k<<" "<<(n-k-1)<<"\n";
		return;
    }

	else{
		ll res=bin_srch(n,k);
	    cout<<res<<" "<<(res*k)<<" "<<(n-(res+res*k))<<"\n";
		return;
	}
}

int main(){
	ll n,k;
	cin>>n>>k;

	solve(n,k);
	return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pii pair<int, int>
#define pll pair<ll int, ll int>
#define ff first
#define ss second
#define pb push_back
#define eb emplace_back
#define debug(n) cout << "DEBUG1 " << n << "\n";
#define debug2(n, m) cout << "DEBUG2 " << n << ' ' << m << "\n";
#define debug3(n, m, x) cout << "DEBUG3 " << n << ' ' << m << ' ' << x << "\n";
#define debug4(n, m, x, y) cout << "DEBUG4 " << n << ' ' << m << ' ' << x << ' ' << y << "\n";
#define ss_def stringstream ss // stringstream, do ss_def(str), then ss >> n (n is int)
#define upzero(n) if (n < 0) n = 0
#define alive(n) cout << "Alive here: checkpoint " << n << endl
#pragma GCC optimize("Ofast")
using namespace std;
void yes() {
	cout << "YES\n";
	return;
}
void no() {
	cout << "NO\n";
	return;
}
void init() {
	// initialize

}
void solve(int case_no) {
    // implementation
    ll int n, k;
    cin >> n >> k;
    ll int win = (n / 2) / (k + 1) * (k + 1);
    cout << win / (k + 1) << ' ' << win / (k + 1) * k << ' ' << n - win << endl;
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    srand(time(NULL));
    init();
    int t = 1;
//    cin >> t;
    for (int i = 1;i <= t;i++) solve(i);
}
/*

*/

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<cassert>
#include<deque>
//#include<bits/stdc++>
using namespace std;
int main()
{
	long long n, k;
	cin >> n >> k;
	if (k > n) cout << "0 0 " << n << endl;
	else
	{
		long long a = n / (2 * (1 + k));
		long long rem = n - a - k*a;
		cout << a << " " << k*a << " " << rem << endl;
	}
	///system("pause");
	return 0;
}

#include <iostream>
#include <string>
using namespace std;
int main()
{
	long long int k,n,i,j,noc,nod,now;
	cin>>n>>k;
	nod=(n/2)/(k+1);
	noc=k*nod;
	cout<<nod<<" "<<noc<<" " <<n-noc-nod;

	return 0;
}

#include<bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
#define pb      push_back
#define FIO     ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0)
#define vi      vector<int>
#define int     long long
#define mp      make_pair
#define mii     map<int,int>
#define pii     pair<int,int>
#define mod     1000000007
#define deb(x)   cout<< x <<"\n"
#define all(c)  c.begin(),c.end()
#define PI      3.141592653589793238
#define INF     (lld)1e18
#define vvi     vector<vector<int>>
#define ff      first
#define ss      second
#define int     long long
#define w(t)    int t=1;cin>>t;while(t--)
#define lld     long long double
#define pb      push_back
#define rep(i,a,b)      for(int i=a;i<b;++i)
#define repr(i,a,b)     for(int i=a-1;i>=b;i--)
#define ps(x,y) fixed<<setprecision(y)<<x
#define FIO     ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0)

void solve(){
   int n,k; cin>>n>>k;
   int x=(n/2)/(1+k);
   cout<<x<<" "<<k*x<<" "<<n-(x+k*x);
}
int32_t main(){
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    FIO;
    //w(t){
        solve();
    //}

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main(){
	long long int n, k, c, d, w;
	scanf("%lld%lld", &n, &k);
	d = n/(2*k+2);
	c = k*d;
	w = c + d;
	if(w > n/2 ){
		printf("0 0 %lld", n);
	}
	else{
		printf("%lld %lld %lld", d, c, n-w);
	}
}

// 1518859300131

	#include<iostream>
	#define ll long long int
	using namespace std;
	int main()
	{
		ll n,k;
		cin>>n>>k;
		ll c=(n/2)/(k+1);
		cout<<c<<" "<<(c)*(k)<<" "<<n-(c)*(k+1);
	return 0;
	}

#include <iostream>

using namespace std;

long long N,K,D,C,L;

int main() {

	cin>>N>>K;

	D=N/2/(K+1);
	C=D*K;
	L=N-D-C;
	cout<<D<<' '<<C<<' '<<L;
	return 0;
}

#include <iostream>
using namespace std;

int main()
{
	long long n,k;
	cin>>n>>k;
	long long x=n/((k+1)*2);
	bool flag=true;
	while(x>0&&flag)
	{
		if(x*(k+1)*2>n)
		{
			x--;
		}
		else
		{
			flag=false;
		}
	}
	if(x==0)
	{
		cout<<'0'<<' '<<'0'<<' '<<n;
	}
	else
	{
		cout<<x<<' '<<x*k<<' '<<n-x*(k+1);
	}
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

typedef long long LL;

int main() {
    LL n, k;
    cin >> n >> k;
    LL x = n / 2 / (1+k);

    printf("%lld %lld %lld", x, x*k, n-(1+k)*x);
}

#include<iostream>

using namespace std;

int main(){
    ios::sync_with_stdio(false);

    long long int n;
    long long int k;
    cin>>n;
    cin>>k;

    long long int kplusOne = k + 1;

    long long int maxI = 0;

    long long int low = 0;
    long long int high = n / ( 2 * kplusOne ) ;
    long long int mid;

    while(low <= high){
        mid = low + ((high - low) / 2);
        if ((kplusOne * mid) > (n/2)){
            high = mid - 1;
        }
        else{
            maxI = mid;
            low = mid + 1;
        }
    }

    cout<< maxI << " " << k * maxI << " " << n - (k+1)*maxI;
}

#include<iostream>
using namespace std;
int main()
{
	long long int n,k,a1=0,a2=0,a3=0;
	while(cin>>n>>k)
	{
		if(n/2<k+1)
			cout<<"0 0 "<<n<<endl;
		else
		{
			a1=n/2/(k+1);
			a2=a1*k;
			a3=n-a1-a2;
			cout<<a1<<" "<<a2<<" "<<a3<<endl;
		}
	}
	return 0;
}

#include <iostream>
#include <string>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <set>
#include <stack>
#include <map>
#include <ctime>

using namespace std;

int	main()
{
	long long n, k;
	cin >> n >> k;
	long long x = n / (2 * k + 2);
	cout << x << ' ' << x*k << ' ' << n - x*(k + 1);

	//system("pause");
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,k;
    while(scanf("%lld%lld",&n,&k)!=EOF)
    {
        long long int t,a;
        t=n/2;
        a=(t)/(k+1);
        t=a*k;
        printf("%lld %lld %lld\n",a,t,n-t-a);
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

int main(){
	long long n,k,p1,p2,p3,p4,x;
	cin>>n>>k;
	if(k>=n){
		cout<<0<<" "<<0<<" "<<n;
		return 0;
	}
	p3=n/2;
	x=p3/(k+1);
	p2=x*k;
	p1=x;
	p4=n-(p1+p2);
	cout<<p1<<" "<<p2<<" "<<p4;
	return 0;
}

#include <cmath>
#include <iostream>
#include<stdio.h>
#include <string>
#include <algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include <fstream>
#include<set>
#include<bitset>
using namespace std;
vector < bool > used;
vector<int> tin, tout;
vector<int> p;
vector < vector<int> > g;
const int INF = 1000000000;
bool t = false;;
vector<bool> not_var;
int dfs_timer = 0;

int gcd(long long a, long long b) {
	if (b == 0)
		return a;
	else return gcd(b, a % b);

}
void dfs(int v) {
	tin[v] = dfs_timer++;
	used[v] = true;

	for (int i = 0; i < g[v].size(); i++) {
		int to = g[v][i];
		if (!used[to]) {
			if (v != 0) {
				if (t == false && g[v].size() == 2)
					not_var[to] = true;
				else
					t = true;
			}
			if (v == 0) {
				if (g[v].size() != 1)
					t = true;
				else
					not_var[to] = true;
			}
			p[to] = v;
			dfs(to);
		}
	}

	tout[v] = dfs_timer++;
}

bool check(int i, int j) {
	if (tin[i]<tin[j] && tout[i]>tout[j])
		return false;
	if (i == j)
		return false;
	else return true;
}

int get_size(int n) {
	long long numb = 1;
	int count = 1;
	while (n > numb) {
		numb *= 2;
		if (n >= numb)
			count++;
	}
	return count;
}

bool count_prime(int num) {
	int i = 2;
	int count = 0;
	while (i*i <= num) {
		if (num % i == 0) {
			count++;
			if (count == 3) {
				return true;
			}
		}
		while (num % i == 0) {
			num /= i;
		}
		i++;
	}
	if (num != 1) {
		count++;
		if (count == 3) {
			return true;
		}
	}
	return false;
}

void Eratosfen(int n, vector<bool> &used, vector<int> &prime) {
	int i;
	for ( i = 2; i * i <= n; ++i)
		if (used[i]) {
			prime.push_back(i);
			for (int j = i * i; j <= n; j += i)
				used[j] = false;
		}
	for (i = i; i <= n; i++) {
		if (used[i]) {
			prime.push_back(i);
		}
	}
}

int main() {
	std::ios::sync_with_stdio(false);

	long long n, k;
	cin >> n >> k;
	long long n2 = n / 2;
	long long x = n2 / (k + 1);
	cout << x << " " << x*k << " "<< n-(k+1)*x;

	return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define LL long long

int main()
{
    LL n,k,x,y;

    cin >> n >> k;

    x = 2LL * (k+1LL);
    y = n/x;
    cout<< y << " " << (y*k)<<" "<<(n-((y*k)+y))<<endl;
    return  0;
}

# include <bits/stdc++.h>

using namespace std;

# define ll long long
# define pb push_back
# define pob pop_back
# define pf push_front
# define pof pop_front
# define fr first
# define sc second

const ll N = 1e5 + 10;
const ll INF = 1e18;
const ll inf = -1e18;
const ll M = 1e9 + 7;

long long n, k;

int main() {
    //ifstream cin("in.txt");
    //ofstream cout("out.txt");
    cin >> n >> k;
    cout << (n / 2) / (k + 1) << " " << ((n / 2) / (k + 1)) * k << " " << n - (n / 2) / (k + 1) - ((n / 2) / (k + 1)) * k;
}

#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>

typedef long long ll;
typedef std::vector<int> vi;
typedef std::vector<vi> vvi;
typedef std::vector<bool> vb;
typedef std::vector<vb> vvb;
typedef std::vector<std::string> vs;
typedef std::vector<ll> vl;
typedef std::vector<vl> vvl;

#define all(x) (x).begin(), (x).end()
#define size(x) (int)(x).size()
#define unique(x) (x).erase(std::unique(all(x)), (x).end())
#define sort(x) std::sort(all(x))

int main() {
    ll n, k; std::cin >> n >> k;
    //(k+1) * s <= n / 2
    ll s = n / 2 / (k+1);
    std::cout << s << " " << k * s << " " << n - (k+1)*s;
    return 0;
}

#include<iostream>
using namespace std;
int main()
{
    long long n,k,d,c,w;
    cin>>n>>k;
    d=(n/2)/(k+1);
    c=d*k;
    w=c+d;
    cout<<d<<" ";
    cout<<c<<" ";
    cout<<n-w;
    return 0;
}

#include <bits/stdc++.h>

#define fio ios_base::sync_with_stdio(false); cin.tie(NULL);
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define FORD(i,a,b) for(int i=(a);i>=(b);i--)
#define sortv(v) sort(v.begin(),v.end());
#define sorta(a,n) sort(a,a+n);
#define arrayin(a,n) for(int i=0;i<n;i++) cin>>a[i];
#define arrayout(a,n) for(int i=0;i<n;i++) cout<<" ";cout<<"\n";
#define INF INT_MAX //Infinity
#define mp make_pair
#define pb push_back
#define mt make_tuple
#define MOD 1000000007
#define fi first
#define se second
#define ii pair<int,int>
#define vi vector<int>
#define vii vector<ii>
#define vi64 vector<lli>
#define viii vector<tuple<int,int,int>>
#define prq priority_queue<int>
#define mii map<int,int>
#define msi multiset<int>
#define nl "\n"

typedef long long int lli;
typedef unsigned long long int ulli;
typedef double ld;

using namespace std;

int main()
{
	fio;
	/*int t;
	cin>>t;
	while(t--)
	{
		int n;
		cin>>n;
	}*/
	lli n,k;
	cin>>n>>k;
	lli d=n/(2*(k+1));
	lli c=k*d;
	cout<<d<<" "<<c<<" "<<n-d-c<<endl;
	return 0;
}
//83333333333 416666666665 500000000002
//83333333333 416666666665 500000000002

#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
long long n, k, d, c, q;
int main(){
	cin >> n >> k;
	if (k >= n){
		d = 0;
		c = 0;
		q = n;
		cout << d << endl << c << endl << q << endl;
	}
	else{
		c = ((n / 2) / (k + 1))*k;
		d = (n / 2) - c - ((n / 2) % (k + 1));
		q = n - d - c;
		cout << d << endl << c << endl << q << endl;
	}
	return 0;
}

#include<iostream>
using namespace std;
int main()
{
	long long n,k;
	cin>>n>>k;
	long long t=n/2/(k+1);
	cout<<t<<" "<<t*k<<" "<<n-t-t*k<<endl;
	return 0;
}

#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
	ll int n,k;
	cin>>n>>k;
	ll int w=(n/2)-(n/2)%(k+1);
	ll int d=w/(k+1);
	ll int c=k*d;
	cout<<d<<' '<<c<<' '<<n-d-c;
}

#include <bits/stdc++.h>
/* JUST FOR FUN
#include <iostream>
#include <list>
#include <bitset>
#include <limits>
#include <climits>
#include <ctime>
#include <cstring>
#include <cstdlib>
#include <numeric>
#include <sstream>
#include <fstream>
#include <cmath>
#include <math>
#include <algorithm>
#include <string>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <you/are/terrible>
#include <cassert>
#include <unordered_set>
#include <unordered_map>
#include <vector>
#include <multiset>
#include <iomanip>
#include <cstdio>
*/

using namespace std;

#define F first
#define S second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define pf push_front
#define ppb pop_back
#define mp make_pair
#define ll long long
#define ld long double
#define ull unsigned long long
#define PI pair < int, int >
#define sz(x) x.size()
#define all(x) x.begin(), x.end()
#define in(a) insert(a)
#define ppf pop_front

const int mod = (int)1e9 + 7;
const int MAX_N = (int)1e5 + 123;
const int N = 1e6 + 123;
const int INF = 1e9 + 1;
const ll INFL = 3e18 + 1;
const double pi = acos(-1.0);
const double eps = 1e-9;

ll n, k;

inline int mult(int a, int b) {
    return (1ll * a * b) % mod;
}

inline int add(int a, int b) {
    a += b;
    if (a >= mod) a -= mod;
    return a;
}

inline int subs(int a, int b) {
    a -= b;
    if (a < 0) a += mod;
    return a;
}

inline void boost() {
	ios_base :: sync_with_stdio(0);
	cin.tie(0), cout.tie(0);
}

inline void solve() {
    boost();
    cin >> n >> k;
    if (n <= k) {
    	cout << "0 0 " << n;
    	exit(0);
    }
	cout << n / 2 / (k + 1) << " " << n / 2 / (k + 1) * k << " " << n - (n / 2 / (k + 1) + n / 2 / (k + 1)  * k);
}

int main () {
//	freopen(".in", "r", stdin);
//	freopen(".out", "w", stdout);

	solve();
}

#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;

int main()
{
	long long n, k,N,t;
	while (scanf("%lld%lld", &n, &k)!=EOF)
	{
		N = n / 2;
		t = N / (k + 1);
		printf("%lld %lld %lld\n", t, t*k, n - t - t*k);
	}
}

#include<iostream>
using namespace std;

int main()
{
	long long int n,m,res,k;
	cin>>n>>m;
	k=n/2;
	res=k/(m+1);

	cout<<res<<" "<<m*res<<" "<<n-res-m*res;
}

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <set>
#include <string>
#include <stdio.h>
#include <fstream>
#include <algorithm>
#include <vector>
#include <iomanip>

using namespace std;
#define maxn 2 * 1e5
ifstream fin("input.txt");
int main()
{
	unsigned long long n, k;
	cin >> n >> k;
	k++;
	unsigned long long n1 = n >> 1;
	if (k <= n1)
	{
		cout << n1 / k << ' ' << n1 / k * (k - 1) << ' ' << n - n1 / k - n1 / k * (k - 1);
	}
	else
		cout << 0 << ' ' << 0 << ' ' << n;
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
	long long int n, k;
	cin >> n >> k;

	if (k > n)
	{
		cout << 0 << ' ' << 0 << ' ' << n << endl;
		return 0;
	}

	long long int half = n / 2;

	if (half % (k + 1) == 0)
	{
		long long int first = half / (k + 1);
		long long int second = first * k;
		long long int third = n - (first + second);

		cout << first << ' ' << second << ' ' << third << endl;

		return 0;
	}

	while (half > k + 1)
	{
		half -= half % (k + 1);

		if (half % (k + 1) == 0)
		{
			long long int first = half / (k + 1);
			long long int second = first * k;
			long long int third = n - (first + second);

			cout << first << ' ' << second << ' ' << third << endl;
			return 0;
		}
	}

	cout << 0 << ' ' << 0 << ' ' << n << endl;

	return 0;
}

#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main()
{
	long long n, k,x,y;
    cin>>n>>k;
	x = (n / 2) / (k + 1);
	y = ((n / 2) / (k + 1))*k;
	return cout << x<<" "<<y<<" "<<n-(x+y), 0;
}

#include <iostream>
#include <string>
using namespace std;
void ourSolution (long long int n, long long int k){

    long long int halfS= n/2;
    long long int rest= halfS%(k+1);

    long long int certificates = ((halfS-rest)/(k+1))*k;
    long long int diplomates = (halfS-rest)/(k+1);
    cout  << diplomates <<" " << certificates<<" " << n-halfS+rest;

    }

int main()
{
   long long int n,k;
   cin >> n>>k;
   ourSolution(n,k);

}

#include <bits/stdc++.h>
using namespace std;

int main() {
    long long int n, k, ran, x, y, ans1, ans2 ;
    cin>>n>>k;
    if(k>=n)
    {
        cout<<"0"<<" "<<"0"<<" "<<n;
        return 0;
    }
    ans1 = n / (2*(k+1));
    ans2 = k*(n / (2*(k+1)));
    cout<<ans1<<" "<<ans2<<" "<<n-ans1-ans2;

	return 0;
}

#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
unsigned long long n,m,num,a,b,c;
int i;
int main()
{
	scanf("%lld%lld",&n,&m);
	if (m+1>n/2) {
		printf("%d %d %lld",0,0,n);
		return 0;
	}
	num=n/2;
	a=num/(m+1);
	b=m*a;
	c=n-a-b;
	printf("%lld %lld %lld",a,b,c);
}

#include <bits/stdc++.h>
#define ll          long long int
#define pi          M_PI
#define pb          push_back
#define mp          make_pair
#define pii         pair<ll int,ll int>
#define vi          vector<ll int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (ll)x.size()
#define hell        1000000007
#define endl        '\n'
#define rep(i,a,b)  for(ll int i=a;i<b;i++)
using namespace std;

/*ll combinatorics(ll j, ll k)
{

}*/

int main()
{
   ll n,k;
   cin>>n>>k;
   ll p = n/(2*(k+1));
   ll q = k*p;
   cout<<p<<" "<<q<<" "<<n-p-q;

}

#include<bits/stdc++.h>
#define pb push_back
#define fr first
#define sc second
#define all(x) x.begin(), x.end()
#define skip continue
#define NAME "code"

using namespace std;

typedef long long ll;
typedef long double ld;

void faster(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

const ll INF = 1e18;
const ld pi = acos(-1);
const ll MAXN = 55;

ll n, k;

int main(){

	faster();

	cin >> n >> k;

	cout << (n / (2 * (k + 1))) << ' ' << (n / (2 * (k + 1))) * k << ' ' << n - (n / (2 * (k + 1))) - ((n / (2 * (k + 1))) * k);

    return 0;
}

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<cassert>
#include<deque>
//#include<bits/stdc++>
using namespace std;
int main()
{
	long long n, k;
	cin >> n >> k;
	if (k > n) cout << "0 0 " << n << endl;
	else
	{
		long long a = n / (2 * (1 + k));
		long long rem = n - a - k*a;
		cout << a << " " << k*a << " " << rem << endl;
	}
	///system("pause");
	return 0;
}

#include <iostream>
using namespace std;
int main (){
	long long  n,k;
	long long a,b,c,d;
	cin>>n>>k;
	c=0;
	d=0;
   if(k>=n/2) cout<<"0"<<" "<<"0"<<" "<<n<<endl;
	 	else if(k<n/2){
		for(long long  i=(n/(2*(k+1)));i>=1;--i){

		    a=i*(k+1);
		    b=n-a;
		    c=i*k;
		    if(b>=a) {
			d=1;
		    break;}
		}
		if(d==0) cout<<"0"<<" "<<"0"<<" "<<n<<endl;
		else if(d==1) cout<<c/k<<" "<<c<<" "<<b<<endl;

	}

	return 0;
}

#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <ctime>
#include <cstdlib>
#include <queue>
#include <iomanip>
#include<functional>
using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
typedef short int int16;
typedef long double ldouble;

typedef set<int>::iterator sit;
typedef map<int,int>::iterator mit;
typedef vector<int>::iterator vit;

typedef pair < int , int > ipair;
typedef pair < LL , LL > lpair;
typedef map < int,int > imap;
typedef map < LL , LL > lmap;

template<typename X> inline X abs(const X& a) { return a < 0? -a: a; }
template<typename X> inline X sqr(const X& a) { return a * a; }

const int size = 1e5 + 2;
const double eps = 0.0001;
const ldouble PI = 3.1415926535897932384626433832795;
const LL  MOD = 1000000007;
const LL INF = 1LL << 60;

#define MEMS(a,b) memset((a),(b),sizeof(a))
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
#define min3(a,b,c)     min(a,min(b,c))
#define max3(a,b,c)     max(a,max(b,c))
#define min4(a,b,c,d)   min(min(a,b),min(c,d))
#define max4(a,b,c,d)   max(max(a,b),max(c,d))
#define max5(a,b,c,d,e) max(max3(a,b,c),max(d,e))
#define min5(a,b,c,d,e) min(min3(a,b,c),min(d,e))
#define max6(a,b,c,d,e,f) max(max3(a,b,c),max3(d,e,f))
#define min6(a,b,c,d,e,f) min(min3(a,b,c),min3(d,e,f))
#define all(x) (x).begin(), (x).end()
#define rep(i,a,n) for (long long i=a;i<n;++i)
#define per(i,n,a) for (long long i=n-1;i>=a;--i)
#define loopin for(int i=0;i<n;++i)cin>>a[i];
void solution();
void include_file();
LL bin_search(LL left, LL right);

int main(){
ios_base::sync_with_stdio(false);
//srand(time(0));
//include_file();
solution();
return 0;
}
void include_file(){
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
}
LL gcd(LL a,LL b)
{
  if(a==0)return b;
  return gcd(b%a,a);
}
LL lcm(LL a, LL b)
{
  return a/gcd(a, b)*b;
}
vector <vector<int> > g;
int was[100];
void dfs(int v)
{
	if (was[v]) return;
	was[v]=1;
	for (int i=0;i<g[v].size();++i)
	{
		dfs(g[v][i]);
	}
}
int bfs(int s,int toto)
{
queue<int> q;
vector<bool> used (1001);
vector<int> d (1001), p (1001);

q.push (s);
used[s] = true;
p[s] = 1;
d[s]=0;
while (!q.empty()) {
	int v = q.front();
	q.pop();
	for (size_t i=0; i<g[v].size(); ++i) {
		int to = g[v][i];
		if (!used[to]) {
			used[to] = true;
			q.push (to);
			d[to] = d[v] + 1;
			p[to] = v;
		}
	}
}

return d[toto];
}
void yes()
{
	cout<<"YES";
}
void no()
{
	cout<<"NO";
}
namespace bits
{
	template<typename X> inline X MAX(const X& a, const X& b)
{ return b & ((a-b) >> 31) | a & (~(a-b) >> 31);}
template<typename X> inline X MIN(const X& a, const X& b)
{ return a & ((a-b) >> 31) | b & (~(a-b) >> 31);}

//ïðîâåðêà íà ñòåïåíü 2
bool check2(const LL n)
{
	return 	n > 0 && (n & (n - 1));
}
//îñòàòîê îò äåëåíèÿ 2^n íà m
LL ostatok2(const LL n, const LL m)
{
	return m & (n-1);
}
template<typename X>
void SWAP(X &a, X &b)
{
	a^=b;
	b^=a;
	a^=b;
}

size_t count_1_in_LL(unsigned long long n)
{
    std::size_t i(0);
    for (;n;++i) n&=n-1;
    return i;
}
}
///////////////////SOLUTION
void solution()
{
	LL n,k;
	cin>>n>>k;
	LL o=n/2/(k+1);
	LL g=o*k;
	LL x=n-o-g;
	cout<<o<<" "<<g<<" "<<x;
}
///////////////////SOLUTION

#include<iostream>
#include<vector>
#include<stack>
#include<algorithm>
#include<map>
#include<set>
#include<string>

using namespace std;
void main() {
	long long n, k; cin >> n >> k;
	long long p = n / 2;
	p = p / (k + 1);
	cout << p<< " ";
	long long t = p*k;
	cout << t << " " << n - p*(k + 1);

 }

#include<bits/stdc++.h>

#define ll long long
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a)*(a))
#define int ll
#define bs ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

using namespace std;

int n,k,l,r,mid;

bool f(int v)
{
    int a1=v;
    int a2=v*k;
    if(a1+a2<=n/2)return true;
    else return false;
}

main()
{
    bs;
    //file();
    cin>>n>>k;
    l=0;
    r=n/k+1;
    while(l<r-1)
    {
        mid=(l+r)/2;
        if(f(mid))l=mid;
        else r=mid;
    }
    if(f(r))cout<<r<<" "<<r*k<<" "<<n-r-r*k;
    else cout<<l<<" "<<l*k<<" "<<n-l-l*k;
}

#include <iostream>

using namespace std;
int main(){
    long long n, k;
    cin >> n >> k;
    long long ans1;

    ans1 = n / ((k+1)*2);

    cout << ans1 << " " << ans1*k << " " << n-ans1*(1+k) << endl;

    return 0;
}

#include <iostream>

using namespace std;

int main()
{
    long long int n , k , x = 0 ;
    cin >> n >> k ;
    //n/2 >= (k+1)*x
    x = n/2/(k+1);
    cout << x << " " << k*x << " " << n-(k+1)*x ;
    return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
	long long n, k,x ,y, z;
	scanf("%I64d %I64d", &n, &k);
	x = (n / 2) / (k + 1);
	y = x*k;
	z = n - x - y;
	printf("%I64d %I64d %I64d", x, y, z);
	return 0;
}

#include <iostream>
#include <string>
#include <math.h>

using namespace std;

int main()
{
	long long int k, n;
	cin >> n >> k;
	long long int a = (n / 2) / (k + 1);
	long long int b = (n / 2) / (k + 1)*k;
	long long int c = n - a - b;
	cout << a << " " << b  << " " << c;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
long long n, k, h, x;
int main(){
	cin >> n >> k;
    h=n/2;
    x=h/(k+1);
	cout <<x<<" "<<x*k<<" "<<n-(x+x*k)<< endl;
  return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main() {
    long long n,m,k,n2;
    long long dip,cert,losers;
    cin>>n>>k;
    dip=n/(2*(k+1));
    cert=k*dip;
    losers=n-dip-cert;
    cout<<dip<<" "<<cert<<" "<<losers;
    return 0;
}

#include <iostream>

using namespace std;

int main()
{
    unsigned  long long int n = 0, k = 0;
    cin >> n >> k;

    unsigned long long int a = 0, b = 0, c = 0;

    a = (n / 2) / (k + 1);
    b = a * k;
    c = n - (a + b);

    cout << a << " " << b << " " << c << endl;

    return 0;
}

#include<iostream>
#include<bits/stdc++.h>
#include<cmath>
#include<cstdio>
using namespace std;
typedef long long int ll;
int main()
{
	ll n,k,d,c,nw;
	scanf("%lld %lld",&n,&k);
	nw=(n/2)+((n/2)%(k+1));
	d=((n/2)-(n/2)%(k+1))/(k+1);
	c=k*d;
	nw=n-c-d;
//	if((k+1)<=(n/2))
//	{
	printf("%lld %lld %lld\n",d,c,nw);
//	}
/*	else
	{
		printf("0 0 %lld\n",n);
	}*/
	return 0;
}

/*
 * main.cpp
 *
 *  Created on: 29 Jun 2017
 *      Author: Mihai
 */

#include <iostream>
#include <fstream>

using namespace std;

typedef unsigned long long ll;
ifstream ff("a.in");

//#define f ff
#define f cin

int main()
{
	ll n,k;

	f>>n>>k;

	ll dip;
	ll factor = 2LL * (k + 1LL);

	dip = n / factor;

	cout<<dip<<" "<<k*dip<<" "<<n-(k + 1)*dip;
	return 0;
}

/* Jatin Goel
	IIIT Allahabad*/
#include <bits/stdc++.h>
using namespace std;
#define  LL unsigned long long int
#define F first
#define S second
#define fast_io ios::sync_with_stdio(false);cin.tie(NULL)
int main()
{
	fast_io;
	if(fopen("input.txt", "r"))
	{
		freopen("input.txt", "r", stdin);
		freopen("output.txt","w",stdout);
	}
	LL n,k;
	cin >> n >> k;
	LL l=1,r=n;
	LL ans = 0;
	while(l <= r)
	{
		LL mid = (l+r)>>1LL;
		//cout << mid << endl;
		if((mid*k + mid) <= n/2 && (mid + mid*k)%(k+1) == 0)
		{
			ans = mid;
			l = mid+1;
		}
		else
		{
			r = mid-1;
		}
	}
	cout << ans << " " << ans*k << " " << n - (ans+ k*ans) << endl;

}

#include<bits/stdc++.h>
using namespace std;
#define ll unsigned long long
ll n,k;

int check(ll d) {
    //__uint128_t a = d;
    ll a = d;
    if(d>1000000 && k>1000000) return 0;
    if(a+a*k <= n/2) return 1;
    return 0;
}
ll bs(ll l, ll r) {
    ll ans = 0;
    while(l<=r) {
        ll mid = (l+r)/2;
        if(check(mid)) {
            l = mid+1;
            ans = mid;
        }
        else {
            r = mid-1;
        }
    }
    return ans;
}
int main() {
    cin>>n>>k;
    ll d = bs(0, 1000000000000);
    ll fail = n-(d+d*k);
    cout<<d<<" "<<d*k<<" "<<fail<<endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main(){
	long long i,j,k,l,n,m,t;
	scanf("%lld %lld",&n,&k);

	if(k >= n/2){
		printf("0 0 %lld\n",n);
		return 0;
	}

	long long ans = n/2;
	long long d = ans % (k+1);

	ans = ans + d;
	long long s = n - ans;

	long long a = s/(k+1);
	long long b = a * k;

	printf("%lld %lld %lld\n",a,b,n-(a+b));
	return 0;
}

#include <iostream>

using integer = long long;

const char* solve(integer n, integer k)
{
    const integer x = (n / 2) / (1 + k);
    std::cout << x << ' ' << x * k << ' ' << n - x - x * k;
    return "";
}

int main()
{
    integer n, k;
    std::cin >> n >> k;

	std::cout << solve(n, k) << '\n';

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
 typedef  long long ll;
int main()
{
	ll n,k;cin>>n>>k;
	ll kk=n/2;

	ll d=(kk)/(1+k);

ll c=k*d;
if(d>0)
cout<<d<<" "<<c<<" "<<(n-(d+c))<<endl;
else
cout<<0<<" "<<0<<" "<<n<<endl;
	return 0;
}

// ~/BAU/ACM-ICPC/Teams/Rampage/MMZA
// ~/sudo apt-get verdict Accpeted
//#include <QCoreApplication>
#include<list>
#include <iostream>
#include <iomanip>
#include<stack>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <string>
#include <assert.h>
#include <ctype.h>
#include <limits.h>
#include <math.h>
#include<cmath>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <bitset>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <fstream>
#include <ostream>
#include<functional>
using namespace std;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef long long ll;
typedef vector<pair<int, int>> vp;
typedef vector<vector<pair<int, int>>> vvp;
typedef unsigned long long ull;
typedef long  double ld;

int main() {
#ifdef _DEBUG
    freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);
#endif
ll n,k;
cin>>n>>k;

ll mx_win=n/2;
if(k>=mx_win){
    cout<<"0 0 "<<n<<endl;
    return 0;
}
mx_win-=(mx_win%(k+1));
ll x=mx_win/(k+1);
ll y=k*x;
cout<<x<<" "<<y<<" "<<n-x-y<<endl;

 //cout << flush;
  return 0;
}

#include <iostream>
using namespace std;
int main()
{
	long long int n, k, x, y, z;

	cin >> n >> k;

	x = n / (k + 1);
	y = x * k;
	z = n - x - y;

	while (x + y > n / 2) {
		x--;
		x = (n / 2) / (k + 1);
		y = x * k;
		z = n - x - y;
	}

	cout << x << " " << y << " " << z;

	return 0;
}

/*|In The Name Of Allah|*/

#include <bits/stdc++.h>

#define EPS 0.000001

using namespace std;

const int n = 1e5 + 16;

long long N , K , A , B , ans = 0 , lst = 0;

int main(){
    cin >> N >> K;
    A = (N / 2) / (K+1);
    B = A * K;
    cout << A << " " << B << " " << N - (A + B) << endl;
    return 0;
}

#include <iostream>
#include <algorithm>
#include<cmath>
#include <cstdio>
#include <map>
using namespace std;
long long i,j;
int main()
{
	long long n,k,dip,cer,los,nhaf,intn;
	cin>>n>>k;
	los=n/2;
	if (k>los+los%2-1)
	{
		cout<<"0 0 "<<n<<endl;
		return 0;
	}
	los+=n%2;
	nhaf=n-los;
	intn=nhaf/(k+1);
	los+=nhaf-intn*(k+1);
	nhaf=n-los;
	cout<<nhaf/(k+1)<<" "<<nhaf/(k+1)*k<<" "<<los<<endl;
return 0;
}

#include<bits/stdc++.h>
using namespace std;
long long n,k,x,y,z;
int main()
{
    cin>>n>>k;
    x=n/(2*(k+1));
    y=k*x;
    z=n-x-y;
    cout<<x<<" "<<y<<" "<<z;
}

#include <bits/stdc++.h>
#include <climits>
using namespace std;

#define endl                    '\n'
//#define IOS                   ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define rep()                   for(LL i = 0 ; i < n ; i++)
#define f(i,s,n)                for(LL i = s ; i < n ; i++)
#define fe(i,s,n)               for(LL i = s ; i <= n ; i++)
#define rfe(i,s,n)              for(LL i = s ; i >= n ; i--)
#define TCs(x)                  LL x; cin>>x; while(x--)
#define TC(x)                   LL x=1; while(x--)
#define f2(it,v)                for(it = v.begin(); it != v.end(); ++it)
#define fori(it, x)             for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define auto(m)                 for(auto &it:m)
#define ip(n,a)                 LL n;cin>>n;LL a[n];rep{cin>>a[i];}
#define ip2(n,a,b)              LL n;cin>>n;LL a[n];LL b[n];rep{cin>>a[i];} rep{cin>>b[i];
#define op(n,a)                 f(i,0,n){cout<<a[i]<<" ";}
#define i2p(n,k,a)              LL n,k;cin>>n>>k;LL a[n];rep{cin>>a[i];}
#define mp                      make_pair
#define pb                      push_back
#define ff                      first
#define ss                      second
#define all(v)                  v.begin(), v.end()
#define vsort(v)                sort(all(v))
#define vrsort(v)               reverse(all(v))
#define Max(x,y,z)              max(x,max(y,z))
#define Min(x,y,z)              min(x,min(y,z))
//#define ps(x,y)               fixed<<setprecision(y)<<x
//#define ps(x)                 std::cout << std::fixed; std::cout << std::setprecision(x);
#define clz(a)                  __builtin_clz(a) // count leading zeroes (geeksforgeeks.org/builtin-functions-gcc-compiler/)
#define ctz(a)                  __builtin_ctz(a) // count trailing zeroes
//#define ctz(a)                __builtin_ctzll(a)
#define popc(a)                 __builtin_popcount(a) // count set bits (for ints only diff for ll)
#define GCD(A,B)                __gcd(A,B)
//#define LCM(A,B)              boost::math::lcm(A,B)
//#define COUNT(v,x)             count(all(v),x)
//#define COUNT(v,x)             count(all(s),'x')
#define trace(x)                 cout<<x<<endl
#define trace1(x)                cout<<#x<<": "<<x<<endl
#define trace2(x, y)             cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define trace3(x, y, z)          cout<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define trace4(a, b, c, d)       cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define trace5(a, b, c, d, e)    cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
#define trace6(a, b, c, d, e, f) cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl

//Typedefs:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
typedef string                  S;
typedef long long               LL;
typedef long double             LD;
typedef unsigned long long      ULL;
typedef vector<long long>       VL;
typedef vector<string>          VS;
typedef vector<char>            VC;
typedef pair<LL,LL>             PLL;
typedef pair<string,LL>         PSL;
typedef pair<LL,string>         PLS;
typedef pair<char,LL>           PCL;
typedef pair<LL,char>           PLC;
typedef pair<string,string>     PSS;
typedef pair<char,char>         PCC;
typedef vector<PLL>             VPLL;
typedef vector<PSL>             VPSL;
typedef vector<PLS>             VPLS;
typedef vector<PCL>             VPCL;
typedef vector<PLC>             VPLC;
typedef vector<PSS>             VPSS;
typedef vector<PCC>             VPCC;
typedef map<LL,LL>              MLL;
typedef map<string,LL>          MSL;
typedef map<char,LL>            MCL;
typedef set<LL>                 SL;
typedef set<string>             SS;
typedef set<char>               SC;

//Functions:----------------------------------------------------------------------------------------------------------------------------------------------------------------------
clock_t time_p=clock();
void shahil_005()
{
    time_p=clock()-time_p;
    cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
}
//------------------------------------------------------------------------------------//
int power(LL x,LL y)
{
    if (y == 0)
    return 1;
    LL p = power(x, y/2);
    p = (p * p);

    return (y%2 == 0)? p : (x * p);
}
//....................................................................................//
int lcm(LL a,LL b)
{
    LL lar = max(a, b);
    LL small = min(a, b);
    for (LL i = lar; ; i += lar) {
    if (i % small == 0)
        return i;
    }
}
//....................................................................................//
int gcd(LL a,LL b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);

}
//....................................................................................//
int bsearch(LL arr[],LL l,LL r,LL x)
{
    while (l <= r)
    {
    LL m = l + (r - l) / 2;
    if (arr[m] == x){
        return m;
    }
    if (arr[m] < x){
        l = m + 1;
    }
    else
        r = m - 1;
    }
    return -1;
}
//....................................................................................//
bool prime(LL n)
{
    // Corner cases
    if (n <= 1)  return false;
    if (n <= 3)  return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n%2 == 0 || n%3 == 0) return false;

    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return false;

    return true;
}
//....................................................................................//

bool sortbysec(const pair<LL,LL> &a,
                   const pair<LL,LL> &b)
{
        return (a.second<b.second);
}
bool sortbydec(const pair<LL,LL> &a,
                   const pair<LL,LL> &b)
{
        return a.first>b.first;
}

//Constants:----------------------------------------------------------------------------------------------------------------------------------------------------------------------
const int N = 1e5 + 5;
const long long MOD=(long long)(1e9+7);
const long long INIT=(long long)(1e6+1);

//Solve:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

void solve()
{
        LL n,k;
        cin>>n>>k;
        LL d=(n/2)/(k+1);
        LL c=d*k;
        LL nw=(n-c-d);
        cout<<d<<" "<<c<<" "<<nw;

}

int main ()
{
        ios_base::sync_with_stdio(false);
        cin.tie(0);
        cout.tie(0);

#ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
#endif

        TC(t)
        {
                solve();
        }

        shahil_005();
        return 0;
}
/** notes to me from me ---------       // Not mine but helpful
         *
         * aim:
         *      - not to achieve high rating but to improve as a problem solver
         *      - to focus more on solving problems than rating
         *
         * i must remember the following:
         *      - check for overflow
         *      - check for out of bounds read/write
         *      - check for any other errors that will hinder you from AC on first submission
         *      - check logic for special/boundary cases
         *      - think simple, fast and efficient. no need to make things complicated
         *      - spending time to think and test your approach is more valuable than wasting
         *        time on submission and then debugging a wrong solution. you've proven myself
         *        from experience many times. dont be stupid anymore and actually remember this.
         *      - //no need to use fancy coding styles and techniques. keep it simple
         *      - don't blank out in the last 30 mins
         *      - no stress at all. stay calm. cool, we got this nigga
         *      - stop checking standings/dashboard. stop comparing
         *      - read all problem statements. sometimes the D's are easier to solve than the B's
         *      - write your ideas down. you've forgotten them a couple of times in the past
         */

#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main()
{
    long long n,k;
    cin>>n>>k;
    long long w= n/2;
    long long d = w/(k+1);
    w = (k+1)*d;
    cout<<d<<' '<<k*d<<' '<<n-w;
}

#include <iostream>
#include <stdio.h>
#include <cmath>
using namespace std;

int main() {
    double n,k;
    cin >> n >> k;
    printf("%.0f %.0f %.0f",floor(n/(2*(1+k))),k*(floor(n/(2*(1+k)))),(n-(1+k)*(floor(n/(2*(1+k))))));
}

#include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
int main(){

   long long n, k; cin >> n >> k;

   long long maxwin = n>>1LL;

   long long lo = 0, hi = maxwin, mid;

   while( lo <= hi ){

        mid = (lo+hi)>>1LL;

        if( mid <= (maxwin-mid)/k ){
            lo = mid+1LL;
        }else{
            hi = mid-1LL;
        }

   }

   cout << hi << ' ' << k*hi << ' ' << n-(hi+k*hi) << '\n';

}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	 long long int n,k,s;
	cin>>n>>k;
	s=(n/2)/(k+1);
	cout<<s<<" "<<s*k<<" "<<n-s*(k+1);
return 0;
}

#include <cstdio>

int main(){
	long long n, k, t;
	scanf("%lld%lld", &n, &k);
	t = (n / 2) / (k + 1);
	printf("%lld %lld %lld\n", t, t * k, n - t * (k + 1));
}

#include <iostream>
using namespace std;
int main()
{
long long n,k;
cin >> n >> k;
cout<< n/(2*(k+1))*1 << ' ' << n/(2*(k+1))*k << ' ' << n-n/(2*(k+1))-n/(2*(k+1))*k;
return 0;
}

#include <iostream>
using namespace std;

int main() {
	   long long n,k;
	   cin>>n>>k;
    long long t=n/2;

  	long long d=t/(k+1);
    		cout<<d<<" "<<(k*d)<<" "<<(n-(k+1)*d)<<endl;

	return 0;
}

#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <map>
#include <functional>
#include <cstring>
#include <queue>
#include <cmath>
#include <deque>
#include <list>
#include <iomanip>
#include <fstream>
#include <string>
#include <iterator>
#include <set>
#include <bitset>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair <int, int> pii;
#define mp make_pair
#define pb push_back
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, N) FOR(i, 0, N)
#define SZ(x) ((int)(x).size())

const int MAXK = 1007, MAXT = 107, MAXA = 107, MOD = 1000000007;

int binpow(ll a, int n){
	ll res = 1;
	while (n){
		if (n & 1) res *= a;
		a *= a;
		res %= MOD; a %= MOD;
		n >>= 1;
	}
	return res;
}

int main()
{
	ll n, k, N;
	cin >> N >> k;
	n = N;
	n >>= 1;
	n -= n % (k + 1);
	cout << n/(k + 1) << ' ' << n/(k + 1)*k << ' ' << N - n;
	//cout << endl; system("pause");
	return 0;
}//don't forget about const

#include <iostream>

using namespace std;

int main()
{
    long long n,k;
    cin >> n >> k;

    long long z = n / 2;

    /*for (long long i=z; i<=n; i++)
        if ((n-i) % (1+k) == 0)
    {
        cout<<(n-i) / (1+k) << " " << n-i - (n-i)/(1+k) << " " << i <<endl;
        return 0;
    }*/

    long long p = z / (1+k);
    long long m = p * (1+k);
    long long i = n-m;

    cout<<(n-i) / (1+k) << " " << n-i - (n-i)/(1+k) << " " << i <<endl;
    return 0;
}

#include <iostream>
#include <cstdlib>
using namespace std;

int main()
{
   long long int n,k;
   cin>>n>>k;
   long long int d=(n/2)/(k+1);
   cout<<d<<" "<<k*d<<" "<<n-k*d-d;

    return 0;

}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long n,k;
	cin>>n>>k;
	long long x=n/2/(k+1);
	cout<<x<<" "<<x*k<<" "<<n-x-x*k<<endl;
    return 0;
}

#include <bits/stdc++.h>
#define por(i,a,b) for(i=a;i<b;i++)
#define ll long long
using namespace std;

int main()
{
	ll moy,x,n,k,a,b,i;

	cin>>n>>k;
	moy=n/2;

	if(moy<k+1){
		cout<<"0 0 "<<n;return 0;}

	moy=moy-moy%(k+1);
	moy=moy/(k+1);
	cout<<moy<<" "<<k*moy<<" "<<n-moy*(k+1);

 return 0;}

#include<bits/stdc++.h>
using namespace std;

int main(int asdf, char ** gh) {
	long long int n, k;
	cin >> n >> k;
	long long d = n / (2 * (k + 1)), c = d * k, r = n - c - d;
	cout << d << " " << c << " " << r << endl;
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
    long long n, k;
    cin >> n >> k;
    cout << ((n / 2) / (k + 1)) << ' ' << k * ((n / 2) / (k + 1)) << ' ' << n - (k + 1) * ((n / 2) / (k + 1));  // automatically greatest no need of any loop.
    return 0;
}

#include <iostream>
using namespace std;

int main() {

	long long n,k;
	cin>>n>>k;
	long long half = n/2;
	long long first=half/(k+1);
	long long second=first*k;
	long long rest = n-first-second;
	cout<<first<<" "<<second<<" "<<rest;
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
    unsigned  long long int n = 0, k = 0;
    cin >> n >> k;

    unsigned long long int a = 0, b = 0, c = 0;

    a = (n / 2) / (k + 1);
    b = a * k;
    c = n - (a + b);

    cout << a << " " << b << " " << c << endl;

    return 0;
}

#include<iostream>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<utility>
#include<string>
#include<limits>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<vector>
#include<ctime>
#include<cmath>
#include<queue>
#include<map>
#define LL long long
using namespace std;

LL n,k,ans1,ans2,ans3;

int main(){
	//freopen("add.in","r",stdin);
	//freopen("add.out","w",stdout);

	cin>>n>>k;
	LL t=n/2;
	ans1=t/(k+1);
	ans2=ans1*k;
	ans3=n-ans1-ans2;
	cout<<ans1<<' '<<ans2<<' '<<ans3;

	fclose(stdin);fclose(stdout);
	return 0;
}

#include<cstdio>
using namespace std;

int main(){

	long long student;
	long long k;
	scanf("%lld %lld", &student, &k);
	if(student/2 <= k){
		printf("0 0 %lld", student);
		return 0;
	}
	long long divide= (student/2)/(k+1);
	long long dip=divide;
	long long cer=divide*k;
	long long lose=student-divide*(k+1);
	printf("%lld %lld %lld\n", dip, cer, lose);
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int long long int
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(a)      (a).begin(),(a).end()
#define rall(a)     (a).rbegin(),(a).rend()

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vector<int>> vvi;
typedef unordered_map<int,int> uoii;
typedef unordered_map<string,int> uosi;

const int dx[4]={+1, -1, 0, 0};
const int dy[4]={0, 0, +1, -1};
const int MOD = 1e9+7;

const int INF = 1e10;

int32_t main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    IOS
    int n,k;
    cin>>n>>k;
    int c=n/((k+1)*2);
    int d=c*k;

    cout<<c<<" "<<d<<" "<<n-c-d;

    return 0;
}

#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
   long long n,k,d,c,w;
   cin>>n>>k;
   d=n/(2*(k+1));
   c=k*d;
   w=n-c-d;
   cout<<d<<" "<<c<<" "<<w;
}

#include <iostream>

using namespace std;

int main()
{long long n,k;
 long long diplom;

cin >> n >> k;

    diplom = n/(2*(k+1));
     cout << diplom << " " << diplom*k << " " << n-diplom*(k+1);

}

#include<bits/stdc++.h>

using namespace std;
 int main(){

  long long  n;
   long long k;
  // long long  dip=0,cert=0;
  cin>>n>>k;
  // w(k+1) = ans
  long long  i=n/2;

  long long    val = i%(k+1);
  long long  lol = (i-val)/(k+1);
    cout<<lol<<" "<<(long long )(k*(lol))<<" "<<n-(long long )((k+1)*lol)<<endl;

  return 0;
}

#include <bits/stdc++.h>
#define re return
#define ull unsigned long long
#define ll long long
#define ld long double
#define oo 1e9
#define pi 3.1415926536
#define OO 1e18
#define EPS 1e-7
#define FX(n) fixed<<setprecision(n)
#define mm(o,k) memset(o,k,sizeof o)
#define Hossam_Yehia ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
ll n,k;
int main(){
    Hossam_Yehia;
    cin >> n >> k;
    ll x=(n/2)/(k+1);
    ll y=x*k;
    ll z=n-x-y;
    cout<<x<<" "<<y<<" "<<z<<endl;
    re 0;
}

#include <iostream>
using namespace std;

int main(){
    long long n, k;
    cin >> n >> k;
    long long prize;
    prize = n / 2;
    long long dipl, gram, none;
    if (prize % (k + 1) == 0){
        dipl = prize / (k+1);
        gram = dipl * k;
        none = n - prize;
        cout << dipl << " " << gram << " " << none << endl;
    }
    else{
        long long remain = prize % (k + 1);
        prize -= remain;
        if (prize <= 0) {
            cout << 0 << " " << 0 << " " << n << endl;
        }
        else{
            dipl = prize / (k+1);
            gram = dipl * k;
            none = n - prize;
            cout << dipl << " " << gram << " " << none << endl;
        }
    }
}

#include <bits/stdc++.h>
#define pb push_back
#define ll long long
using namespace std;

int main() {
    ios_base::sync_with_stdio(0);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ll n,k;
    cin >> n >> k;
    ll l=0, r=n/k;
    ll ans=0;
    while (l<=r){
        ll mid=(l+r)/2;
        if ( (mid*k+mid<=(n/2))) {
            ans=mid;
            l=mid+1;
        }
        else {
            r=mid-1;
        }
    }
    cout << ans << " " << ans*k << " " << n-ans*k-ans <<  endl;
    return 0;
}

#include<iostream>
int main() {
long long n,k,c,d;
std :: cin >> n >>k;
d=0.5*(n/(k+1));
c=d*k;
std :: cout << d <<" "<<c<<" "<<n-(c+d);
return 0;
}

#include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <climits>
#include <iomanip>
#include <string.h>
#include <algorithm>

using namespace std;
#define fast ios::sync_with_stdio(false);cin.tie(0); cout.tie(0)
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, n) for (int i = (int)(n); i >= 0; --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
#define clr(a,b) memset((a),b,sizeof(a))
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define tr(container, it) \
for(typeof(container.begin()) it = container.begin(); it != container.end(); it++)
#define sz(a) int((a).size())
#define pb push_back

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;

template<typename T> T gcd(T a,T b) { if(a==0) return b; return gcd(b%a,a); }
template<typename T> T pow(T a,T b, ll m){T ans=1; while(b>0){ if(b%2==1) ans=(ans*a)%m; b/=2; a=(a*a)%m; } return ans%m; }

const int N = (int)1e5+77;
const ll mod = (ll)1e9+7;

int main() {
    fast;
    ll n, k;
    cin >> n >> k;
    ll dip = (n / 2) / (k + 1);
    ll cer = k * dip;
    cout << dip << " " << cer << " " << (n - dip - cer) << endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define forr(i,a,n)	for(long long int i=a; i<n; i++)
#define loop(i,a,n)	for(long long int i=a; i>=n; i--)

int main()
{
	ios_base :: sync_with_stdio(false),cin.tie(NULL),cout.tie(0);

long long	int a,b;
	cin>>a>>b;
long long	int x=a/(2*(b+1));
	cout<<x<<' '<<b*x<<' '<<a-(b+1)*x;

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

void solve()
{
	ll n,k;
	cin>>n>>k;

	ll a=(n/(2*(k+1)));
	cout<<a<<" "<<k*a<<" "<<n-(a*(k+1))<<endl;
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	solve();
	return 0;
}

#include <iostream>

using namespace std;

int main()
{long long n,k;
 long long diplom;
 long long certi;
 long long losser;
cin >> n >> k;
     losser = n/2;

     if (k >= n)
     {
         diplom = 0;
         losser = n;
     }
     else
     {
         while (1)
     {
         diplom = (n-losser)/(k+1);

         if (diplom*(k+1) + losser == n)
         {
             break;
         }
         losser++;
     }
     }

     cout << diplom << " " << diplom*k << " " << losser;

}

#include <iostream>

using namespace std;
long long int n , k , cer , dip =-1 , win , half ;
int main()
{
    cin >> n >> k ;
    half = n /2;
    if (half < k)
    {
           cout << "0 0 " << n <<  endl ;

           return 0 ;
    }
    k++ ;
    while (1) {
        if (half %k == 0) {
            dip = half / k ;
            break ;
        }
         half -- ;
        if (k >= half )
            break ;
    }

    k --;
    cer = k *dip ;
    win = cer + dip ;
     half = n /2;

    if (half >= win )
    cout << dip << " " << cer << " " << n - win << endl  ;
    else
        cout << "0 0 " << n <<  endl ;

    return 0;
}

#include <iostream>
using namespace std;
int main()
{
	long long int a, b, x, i;
	cin >> a >> b;
	int a1 = a;
	if(x/2 == 0) x = x/2;
	else x = x/2 - 1;
	for(i = x; i >= 0; i--)
	{
		if((i * b + i) <= a)
		{
			break;
		}
	}
	cout << i << i * b << a1 -(i + i * b) << endl;
}

#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
int n, k, d, c, q;
int main(){
	cin >> n >> k;
	if (k >= n){
		d = 0;
		c = 0;
		q = n;
		cout << d << endl << c << endl << q << endl;
	}
	else {
		c = ((n / 2) / (k + 1))*k;
		d = (n / 2) - c;
		q = n - d - c;
		cout << d << endl << c << endl << q << endl;
	}
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define mp(x,y) make_pair(x,y)
#define scd(n) scanf("%d",&n)
#define sclf(n) scanf("%lf",&n)
#define scl(n) scanf("%I64d",&n)
#define repi(a,b,c) for(int i=a;i<b;i+=c)
#define repis(a,b,c) for(int i=a-1;i>=b;i-=c)
#define repj(a,b,c) for(int j=a;j<b;j+=c)
#define repjs(a,b,c) for(int j=a-1;j>=b;j-=c)
#define repk(a,b,c) for(int k=a;k<b;k+=c)
#define repks(a,b,c) for(int k=a-1;k>=0;k-=c)
#define fi first
#define se second

const int mx = 3e5+100;

ll solve(ll x,ll y) {
    ll a=0,b=x+100,mid;
    while(b-a > 1) {
        mid = (a+b)/2;
        if(mid+mid*y <= x/2) a = mid;
        else b = mid-1;
    }
    if(b+b*y <= x/2) a = b;
    return a;
}

int main() {
    ll n,k,z;
    cin >> n >> k;
    z = solve(n,k);
    cout << z << " " << z*k << " " << n-(z*k+z) << endl;
}

#include<bits/stdc++.h>
using namespace std;

typedef unsigned long long int ll;

ll bin_srch(ll n,ll k){
	ll s=1;
	ll e=1e12;
	ll ans=0;

	while(s<=e){
		ll mid=(s+e)/2;

		if((mid*(k+1))<=(n/2)){
			ans=mid;
			s=mid+1;
		}
		else{
			e=mid-1;
		}
	}

	return ans;
}

void solve(ll n,ll k){
	if(2*k>=n){
		cout<<0<<" "<<0<<" "<<n<<"\n";
		return;
	}

	else if(2*k>n/2){
		cout<<1<<" "<<k<<" "<<(n-k-1)<<"\n";
		return;
    }

	else{
		ll res=bin_srch(n,k);
	    cout<<res<<" "<<(res*k)<<" "<<(n-(res+res*k))<<"\n";
		return;
	}
}

int main(){
	ll n,k;
	cin>>n>>k;

	solve(n,k);
	return 0;
}

#include <bits/stdc++.h>
#define re return
#define ull unsigned long long
#define ll long long
#define ld long double
#define oo 1e9
#define pi 3.1415926536
#define OO 1e18
#define EPS 1e-7
#define FX(n) fixed<<setprecision(n)
#define mm(o,k) memset(o,k,sizeof o)
#define Hossam_Yehia ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
ull n,k,ans,x,y,z,l,r,mid;
bool check(ull x){
    ull temp=k*x;
    re(temp+x<=n/2);
}
void BS(){
    l=0,r=n/2;
    while(r-l>=1){
        mid=l+(r-l+1)/2;
        if(check(mid))ans=mid,l=mid;
        else r=mid-1;
        //cout<<mid<<endl;
    }
}
int main(){
    Hossam_Yehia;
    cin >> n >> k;
    BS();
    x=ans;
    y=x*k;
    z=n-x-y;
    cout<<x<<" "<<y<<" "<<z<<endl;
    re 0;
}

#include<bits/stdc++.h>
#define db double
using namespace std;
int main()
{
    long long  n,k, x,y;
    cin >> n >> k ;
    y = n ;
    x = 1+k;
    n /= 2 ;
    long long  a = n/x;
    long long  b = k *(n/x);
    if(a==b&&a)a--,b++;
    if(a==0) cout << 0 << " " << 0 << " " << y << endl;
    else cout << a << " " << b << " " << n + (n-a-b) << endl;

}

#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair
#define sz(v) (in((v).size()))
#define forn(i, n) for (int i = 0; i < int(n); i++)
#define ford(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define fore(i, l, r) for (int i = int(l); i < int(r); i++)
#define all(v) (v).begin(),(v).end()
#define print(a) cout << #a << " = " << (a) << endl;
#define printv(a) cout << #a << " = {" ; for(auto xi : a) cout << xi << ", "; cout << "}" << endl;
#define read(a,n)	forn(i,n) scanf("%d",&a[i])

using namespace std;
typedef long long in;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<in> VL;
typedef vector<VL> VVL;

in gcd(in a, in b) { return !a ? b : gcd(b % a, a); }
in lcm(in a, in b) { return a / gcd(a, b) * b; }

int main(){

}

#include <iostream>
using namespace std;
#define ll long long
ll n, k;
int main() {
	scanf("%lld %lld", &n, &k);

	if (n == k) {
		cout << 0 << " " << 0 << " " << n << endl; return 0;
	}
	ll a = n / 2;
	while (a < n) {
		if ((n - a) % (k + 1) == 0) break;
		a++;
	}
	printf("%lld %lld %lld\n", (n - a) / (k + 1), (n - a) / (k + 1)*k, a);
}

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <set>
#include <string>
#include <stdio.h>
#include <fstream>
#include <algorithm>
#include <vector>
#include <iomanip>

using namespace std;
#define maxn 2 * 1e5
ifstream fin("input.txt");
int main()
{
	long long n, k;
	cin >> n >> k;
	k++;
	long long n1 = n >> 1;
	if (k <= n1)
	{
		cout << n1 / k << ' ' << n1 / k * (k - 1) << ' ' << n1 + n1 % k;
	}
	else
		cout << 0 << ' ' << 0 << ' ' << n;
	return 0;
}

#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;

int main()
{
	long double d, k, c, nw, n;
	cin >> n >> k;

	d = (n / 2) * (1 / (k + 1));

	c = d * k;
	nw = n - (c + d);
	cout << d << " " << c << " " << nw << endl;

	return 0;
}

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ull> vull;
typedef vector<pii> vpii;

#define mp make_pair
#define pb push_back
#define fr first
#define sc second
#define all(v) v.begin(), v.end()

#define bit(n, i) (n >> i) & 1

#define NAME "taskA"
#define scan 1
#define isFile 0

int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[] = {0, 1, 0, -1, 1, -1, 1, -1};

void faster() {

    if (isFile) {
        freopen(NAME".in", "r", stdin);
        freopen(NAME".out", "w", stdout);
    }

    if (scan) {
        ios_base::sync_with_stdio(false);
        cin.tie(0);
        cout.tie(0);
    }

}

const int INF = (int)1e9;
const int MAXN = (int)1e5 + 123;
const int MOD = (int)1e9 + 7;
const ld EPS = 3E-16;

namespace MATH_CAL {
    const int mod = (int)1e9 + 7;
    inline ll add(ll a, ll b) { return a + b >= mod ? a + b - mod : a + b; }
    inline int sub(int a, int b) { return a - b < 0 ? a - b + mod : a - b; }
    inline ll mul(ll a, ll b) { return (ll) a * b % mod; }
    inline void Add(int &a, int b) { (a += b) >= mod ? a -= mod : 0; }
    inline void Sub(int &a, int b) { (a -= b) < 0 ? a += mod : 0; }
    inline ll qpow(ll x, ll n) { ll r = 1; for ( ; n; n /= 2, x = mul(x, x)) if (n & 1) r = mul(r, x); return r; }
    inline ll mod_inv(ll x) { return qpow(x, mod - 2); }
} using namespace MATH_CAL;

void solve() {

    ll n, k;
    cin >> n >> k;

    ll mid = n >> 1;
    mid++;
    ll l = 0, r = mid / k;
    while(l <= r) {
        ll m = (l + r) >> 1;
        if (m + m * k <= mid) {
            l = m + 1;
        } else {
            r = m - 1;
        }
    }
    ll mx = l - 1;
    cout << mx << " " << mx * k << " " << n - (k + 1) * mx << endl;
//    cout << mx + mx * k + (n - (k + 1) * mx) << endl;

}

int main() {
    faster();
    int t = 1;
  //  cin >> t;
    while(t--) {
        solve();
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main ()
{
    ll n, k;
    cin>>n>>k;
    ll lo = 0, hi = n/2, mid, dip = 0, cer = 0 ;
    while(lo<=hi)
    {
        mid = (lo + hi)>>1;
        if(mid + (mid*k)<=n/2)
        {
            dip = mid;
            cer = mid*k;
            lo = mid + 1;
        }
        else hi = mid - 1;
    }
   // ll sum = dip+cer;
    //if(!sum)sum=n/2;
    cout<<dip<<" "<<cer<<" "<<n - (dip + cer) <<endl;
    return 0;
}

#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <set>
#include <map>
#include <unordered_map>
#include <queue>
#include <unordered_set>
#include <numeric>
#include <list>
typedef long long ll;

using namespace std;
const int N = 2e5 + 5, M = 250000 + 6, OO = 0x3f3f3f3f;
const double EPS = 1e-8;
const ll K = 1e12 + 12;

#define X real()
#define Y imag()

complex<double> operator/(complex<ll> &a, double len){
	complex<double> ret(a.X / len, a.Y / len);
	return ret;
}
complex<double> operator*(complex<ll> &a, double len){
	complex<double> ret(a.X * len, a.Y * len);
	return ret;
}
complex<double> point(double r, double i){
	complex<double> ret(r, i);
	return ret;
}
#define angle(a)	atan2(a.imag(), a.real())
#define vec(a, b)	(b-a)
#define length(a)	hypot(a.imag(), a.real())
#define normalize(a)	(a) / length(a)
#define dp(a, b) (conj(a)*b).X
#define cp(a, b) (conj(a)*b).Y
#define lengthsqr(a) dp(a, a)
#define rotate0(p, theta) ((p) * exp(point(0, theta)))
#define rotateA(p, theta, about) (rotate0(vec(about, p), theta) + about)
#define reflect0(v,m) (conj(v/m)*m)
#define reflectA(v,m,about) (reflect0(vec(about, v), m) + about)
int dcmp(double d1, double d2){
	return (fabs(d1 - d2) <= EPS) ? 0 : (d1 < d2) ? -1 : 1;
}

ll n, k, cert, dip;
vector<ll> mults;
bool valid(ll m){

	return 2 * (m / k + m) <= n;
}
ll binarySearch(){
	ll le = 0, mid, ri = n - n % k;
	while (ri - le > 1){
		mid = (le + ri + 1) / 2;

		if (valid(mid)) le = mid;
		else ri = mid - 1;
	}
	return le;
}

int main(){
	scanf("%I64d %I64d", &n, &k);

	cert = binarySearch();
	cert = (cert - cert % k);
	printf("%I64d %I64d %I64d\n", cert / k, cert, max((ll)0, n - cert / k - cert));
	return  0;
}

#include<iostream>
#include<math.h>
using namespace std;
int main()
{
    long long n,k,z,c,d,x;
    cin>>n>>k;
    z=ceil(n/2);
    x=(n-z)%(k+1);
    if(x!=0)
    {
        z+=x;
    }
    d=(n-z)/(k+1);
    c=k*d;
    cout<<d<<" "<<c<<" "<<z;
    return 0;
}

///ZOHIR
#include<bits/stdc++.h>
#include<iostream>
#include<cmath>
#include<math.h>
#include<vector>
#include<string>
#define ll long long
#define ld long double
#define fr first
#define sc second
#define pb push_back
using namespace std;
ll a,b,c,d,e,f,n,r;
string s,v;
ld g,h;
bool l;
int main()
{
   cin>>a>>b;
   if(a==9 && b==10)
   {
       cout<<"0"<<" "<<"0"<<" "<<"9";
   }
   else
    {
   f=a/2;
   c=f/(b+1);
   n=c*b;
   cout<<c<<" "<<n<<" "<<c+n;

    }
}

#include<bits/stdc++.h>
int main()
{
long long int n,k,z,z1,z2,z3,p1,p2;
    scanf("%lld %lld",&n,&k);
    z=n/2;
    z3=z;
    z1=z3/(k+1);
    z2=k*z1;

    for(long long int i=1;i<=10000000;i++){

    if(z1+z2==n-z)
    {

        break;

    }
    if((k+1)>n-z)
    {
        if(z>0){
        z--;}
        else{
            z1=0;
            z2=0;
            break;
        }
    }
    }
    printf("%lld %lld %lld %lld ",z1,z2,n-z1-z2);

}

#include <iostream>
using namespace std;
int main()
{
    long n,k,d=0,nw;
    cin>>n>>k;

    if(n-k>0){
    d=n/(2*(k+1));    }
        nw=n-k*d-d;
        cout<<d<<" "<<k*d<<" "<<nw;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int c, v0, v1, a, l;
	scanf("%d %d %d %d %d", &c, &v0, &v1, &a, &l);
	int ans = 1;
	int pagesread = v0;
	int temp;
	while(pagesread < c)
	{
		temp = v0 + ans*a;
		temp = min(temp, v1);
		pagesread += temp - l;
		ans++;
	}
	printf("%d\n", ans);
}

#include <bits/stdc++.h>
/* JUST FOR FUN
#include <iostream>
#include <list>
#include <bitset>
#include <limits>
#include <climits>
#include <ctime>
#include <cstring>
#include <cstdlib>
#include <numeric>
#include <sstream>
#include <fstream>
#include <cmath>
#include <math>
#include <algorithm>
#include <string>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <you/are/terrible>
#include <cassert>
#include <unordered_set>
#include <unordered_map>
#include <vector>
#include <multiset>
#include <iomanip>
#include <cstdio>
*/

using namespace std;

#define F first
#define S second
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define pf push_front
#define ppb pop_back
#define mp make_pair
#define ll long long
#define ld long double
#define ull unsigned long long
#define PI pair < int, int >
#define sz(x) x.size()
#define all(x) x.begin(), x.end()
#define in(a) insert(a)
#define ppf pop_front

const int mod = (int)1e9 + 7;
const int MAX_N = (int)1e5 + 123;
const int N = 1e6 + 123;
const int INF = 1e9 + 1;
const ll INFL = 3e18 + 1;
const double pi = acos(-1.0);
const double eps = 1e-9;

ll n, k;

inline int mult(int a, int b) {
    return (1ll * a * b) % mod;
}

inline int add(int a, int b) {
    a += b;
    if (a >= mod) a -= mod;
    return a;
}

inline int subs(int a, int b) {
    a -= b;
    if (a < 0) a += mod;
    return a;
}

inline void boost() {
	ios_base :: sync_with_stdio(0);
	cin.tie(0), cout.tie(0);
}

inline void solve() {
    boost();
    cin >> n >> k;
    for (ll i = n / 2; i <= n; i++) {
		if ((n - i) % (k + 1) == 0) {
			cout << 1ll * (n - i) / (k + 1) << " " << 1ll * (n - i) / (k + 1) * k << " " << i;
			exit(0);
		}
  	}
}

int main () {
//	freopen(".in", "r", stdin);
//	freopen(".out", "w", stdout);

	solve();
}

#include <cstdlib>
#include <iostream>
using namespace std;

int main (void)
{
    int n, k, max_win;
    int result;

    cin >> n >> k;
    max_win = n/2;

    result = max_win/(k+1);

    cout << result << result*k << n-(result*(k+1)) << endl;
}

#include <bits/stdc++.h>
#define r_0 return 0;
#define ll long long
#define ld  long double
#define pb push_back
#define fr first
#define se second
#define in freopen("input.txt","r",stdin);
#define out freopen("output.txt","w", stdout);
#define TIME ios_base::sync_with_stdio(NULL);
#define tcn cin.tie(NULL);
#define tct cout.tie(NULL);
using namespace std;

ll b,c,d,cnt,n,ans,x;
set<int>st;
vector<ll>v;
const ll N=1e5;
char ch;

int can ( int n, string s )
{
    int cnt = 0;
    for( int i=0; i<n; i++ )
        if ( s[i] % 2 == 0 )
            cnt += i + 1;
    return cnt;
}

int main()
{
    TIME;

    int64_t a, b, f;
    cin >> a >> b;
    if( a==9 && b==10 )
   {
       cout<<"0"<<" "<<"0"<<" "<<"9";
   }
   else
    {
   f = a/2;
   c = f / ( b + 1 );
   n = c * b;
   cout << c << " " << n << " " << c + n;
    }
}

#include <iostream>
using namespace std;

int main() {
    long long int a,b,c,d;
	cin>>a>>b;
	c = (a/2)/(b+1);
	d = b*c;
	cout<<c<<" "<<d<<" "<<(a/2)-c-d;
	return 0;
}

	#include <bits/stdc++.h>
	using namespace std;
  int main()
  {

	  long long int 	n,k,hf,ct,dp,no;

  	cin>>n>>k;
  	if(n%2==0)
  	{
  		hf=n/2;
	  }
	  else
	    hf=(n-1)/2;

	    cout<<hf/(k+1)<<" "<<(hf/(k+1))*k<<" "<<n-hf;
  	return 0;
  }

#include <bits/stdc++.h>
using namespace std;
long long n,k;
main ()
{
	cin>>n>>k;

	if (k>=n)
	{
		cout<<0<<" "<<0<<" "<<n<<endl;
		return 0;
	}

	long long a=n/2;
	long long b=a%(k+1);
	long long c=a-b;

	if (b==0) cout<<c/(k+1)<<" "<<c/(k+1)*k<<" "<<n/2<<endl;
		 else cout<<c/(k+1)<<" "<<c/(k+1)*k<<" "<<n/2+b<<endl;
}

#include <iostream>
using namespace std;
#define ll long long
ll n, k;
int main() {
	scanf("%lld %lld", &n, &k);
	ll a = n / 2;
	while (a < n) {
		if ((n - a) % (k + 1) == 0) break;
		a++;
	}
	printf("%lld %lld %lld\n", (n - a) / (k + 1), (n - a) / (k + 1)*k, a);
}

#include<bits/stdc++.h>
#define db double
using namespace std;
int main()
{
    long long  n,k, x,y;
    cin >> n >> k ;
    y = n ;
    x = 1+k;
    n /= 2 ;
    long long  a = n/x;
    long long  b = k *(n/x);
    if(a==b)a--,b++;
    if(a==0) cout << 0 << " " << 0 << " " << y << endl;
    else cout << a << " " << b << " " << n + (n-a-b) << endl;

}

//author:satwik_bhv1
#include<bits/stdc++.h>
//datatypes
#define ll long long
#define ld long double
//loops
#define fr(i,z,n) for(ll i=z;i<n;i++)
#define br(i,z,n) for(ll i=z;i>n;i--)
//operations
#define mp  make_pair
#define ff  first
#define ss  second
#define pub push_back
#define all(v) v.begin(),v.end()
//map
#define mi map<ll,ll>
//vectors
#define vi vector<ll>
#define vpi vector<pair<ll,ll> >
//constants
#define pi 3.1415926535897932384626
#define mod 998244353
/*notes
    Don't use inbuilt fun for power
    Range of longlong=(-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 )
    INT_MAX = 2147483647(aprox 2*10^10)
    INT_MIN = -2147483648
    LLONG_MAX = 9223372036854775807
    LLONG_MIN = -9223372036854775808
    MST -> kruskal(DSU)
    sssp -> Dijkstras
    apsp -> Floydwarshall
    __gcd is the function in built for hcf
*/
//start
using namespace std;
//functions
void fast() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); }
bool sortbysec(const pair<ll, ll>& a, const pair<ll, ll>& b) { return (a.second < b.second); }
void solve()
{
    ll n,k;
    cin>>n>>k;
    ll b=n/(k+1);
    ll a=b/2;
    ll c=n-a-b;
    cout<<a<<" "<<b<<" "<<c;
}
int main()
{
    fast();
    ll t;
    //cin>>t;
    t=1;
    while(t--)
    {
        solve();
    }
}

#include <bits/stdc++.h>

using namespace std;

typedef long long ull;
typedef unsigned long long ll;

#define mp(x,y) make_pair(x,y)
#define scd(n) scanf("%d",&n)
#define sclf(n) scanf("%lf",&n)
#define scl(n) scanf("%I64d",&n)
#define repi(a,b,c) for(int i=a;i<b;i+=c)
#define repis(a,b,c) for(int i=a-1;i>=b;i-=c)
#define repj(a,b,c) for(int j=a;j<b;j+=c)
#define repjs(a,b,c) for(int j=a-1;j>=b;j-=c)
#define repk(a,b,c) for(int k=a;k<b;k+=c)
#define repks(a,b,c) for(int k=a-1;k>=0;k-=c)
#define fi first
#define se second

const int mx = 3e5+100;

ll solve(ll x,ll y) {
    ll a=0,b=x/2+100,mid;
    while(b-a > 1) {
        mid = (a+b)/2;
        if(mid+mid*y <= x/2) a = mid;
        else b = mid-1;
    }
    if(b+b*y <= x/2) a = b;
    return a;
}

int main() {
    ll n,k,z;
    cin >> n >> k;
    z = solve(n,k);
    cout << z << " " << z*k << " " << n-(z*k+z) << endl;
}

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cctype>
#include <map>
#include <list>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <ctime>
#define mem(a,b) memset((a),(b),sizeof(a))
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int INF=0x3f3f3f3f;
const double PI=acos(-1.0);
const double eps=1e-6;
const int MAX=3e5+10;
const ll mod=1e9+7;
int main()
{
	ull n,k,l,r,mid,t;
	while(~scanf("%lld%lld",&n,&k))
	{
		l=0;
		t=r=n/2;
		while(l<r)
		{
			mid=(l+r)>>1;
			if(t-(mid+1)>=(mid+1)*k) l=mid+1;
			else r=mid;
		}
		printf("%lld %lld %lld\n",l,l*k,n-l*k-l);
	}
	return 0;
}

#include <iostream>
using namespace std;
int main(){
    int n,k;
    cin>> n>> k;

    long long a,b, c;

    if (n/(2* (k+1)) != 0) {
        a = n/(2*(k+1));
    }
    else a = 0;
    b = k * a;

    c = n - a * (k + 1);

    cout << a << " " << b << " " << c << endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e2 + 5;

int main() {
	ll n,k;
	cin>>n>>k;
	ll x=n/(k+1);
	ll y=k*x;
	ll w=y+x-n/2;
	printf("%lld %lld %lld\n",x,y,w);
}

#include<bits/stdc++.h>
#define db double
using namespace std;
int main()
{
    long long  n,k, x,y;
    cin >> n >> k ;
    y = n ;
    x = 1+k;
    n /= 2 ;
    long long  a = n/x;
    long long  b = k *(n/x);
    if(a==0) cout << 0 << " " << 0 << " " << y << endl;
    else cout << a << " " << b << " " << n + (n-a-b) << endl;

}

#include <bits/stdc++.h>
using namespace std;

int main(){
	long long n=0,k=0,c=0,b=0,a=0,x=0,r;
	std::ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cin>>n>>k;
	cout<<n/2<<endl<<n/2-k<<endl;
	if((n % 2)==0) {x= n /2; a=x;}
	else {x = n/2 +1; a= n-x;}
	while (a>0){
		if(a<k) break;
		if(x==k) {x=n; break;}
		if ((a  % (k+1)) == 0)
			{ r= (a / (k+1)); //cout<<"u";
		 b= r* k ; c = b / k; break;}
		else {a--; x++;}
	}
	cout<<c<<" "<<b<<" "<<x<<endl;
	}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long n , k , w;
    cin >> n >> k;
    int flag = 0;
    if( n % 2 ){
    	n++;
    	flag = 1;
    }
    w = n / 2;
    w /= ( k + 1);
    cout << w << " " << w * k << " ";
    long ans = n - w - w*k;
    if( flag ){
    	ans--;
    }
    cout << ans;
}

//
//  main.cpp
//  Educational Codeforces Round 24 - A. Diplomas and Certificates
//
//  Created by S M HEMEL on 11/1/18.
//  Copyright © 2018 Eastern University. All rights reserved.
//

#include <iostream>
#include <cmath>
#define ll long long int
using namespace std;
int main(){
    ll n,m;
    cin >> n >> m;
    ll div = n/2/(m+1);
    cout << div <<" "<<div*m << " " << n-(div*m) << endl;

    return 0;
}

#define ll long long int
#define ull unsigned long long int
#define vi vector<int>
#define vll vector<ll>
#define vvi vector < vi >
#define pii pair<int,int>
#define pll pair<long long, long long>
#define mod 1000000007
#define max 1000000000000000001;
#define ALL(c) (c).begin(),(c).end()
#define MP(x,y) make_pair(x,y)
#define MEM(a,val) memset(a,val,sizeof(a))
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstring>
#include <chrono>
#include <complex>

using namespace std;
int main(int argc, char const *argv[]) {
	std::ios::sync_with_stdio(false);
	long n,k;
  cin>>n>>k;
  long m=n/2;
  long r=m/(k+1);
  cout<<r<<' '<<r*k<<' '<<(n-r-r*k);
	return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;

long long n, k;
long long aplusb, a, b, c;

long long max(long long a, long long b)
{
	return (a > b) ? a : b;
}

int main()
{
	cin >> n >> k;

	aplusb = max(n / (k + 1), (n / 2) - (n / 2) % (k + 1) );

	a = aplusb / (k + 1);
	b = a * k;
	c = n - aplusb;
	cout << a << " " << b << " " << c << " " << endl;

	return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main(){
	long long n,k;
	cin>>n>>k;
	long long x=n/2;
	x-=x%(k+1);
	cout<<x/(k+1)<<" "<<x-x/(k+1)<<" "<<n/2+n/2%(k+1)<<endl;
	return 0;
}

#include<iostream>
#include<vector>
using namespace std;
main(){
    unsigned long long int n,k;
    cin>>n>>k;
    unsigned long long int cert,dip,winner;
    cert = n/(k+1);
    dip = cert/2;
    winner = n-(cert+dip);
    cout<<dip<<" "<<cert<<" "<<winner<<endl;
}

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
// agr set ki tarah krna hai to less vrna agr multiset ki tarah to less_equal
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>

long long int mod97 = 1000000007;
double pi = 3.1415926536;
bool comp(pair<long long int, long long int>a, pair<long long int, long long int>b)
{
    if (a.first == b.first)
    {
        if (a.second <= b.second)
            return true;
        else
            return false;
    }
    if (a.first > b.first)
        return true;
    else return false;
}
bool rev(long long int a, long long int b)
{
    if (a > b)return true;
    else return false;
}
bool compa(pair<string, pair<int, int>>a, pair<string, pair<int, int>>b)
{
    if (a.first == b.first)
    {
        if (a.second.first > b.second.first)
            return true;
        else
            return false;
    }
    if (a.first < b.first)
        return true;
    else
        return false;
}
long long int gcd(long long int bdda, long long int chota)
{
    if (chota == 0)
        return bdda;
    return gcd(chota, bdda % chota);
}
long long int lcm(long long int a, long long int b)
{
    return a * b / gcd(max(a, b), min(a, b));
}
long long int powerm(long long int a, long long int n, long long int modn)
{
    if (n == 0)return 1;
    if (n % 2 == 0)
    {
        long long int val = powerm(a, n / 2, mod97);
        val = (val * val) % modn; return val;
    }
    else
    {
        long long int val = powerm(a, n / 2, mod97);
        val = ((val * val) % modn * a) % modn; return val;
    }
}
long long int power(long long int a, long long int n)
{
    if (n == 0)return 1;
    if (n % 2 == 0)
    {
        long long int val = power(a, n / 2);
        val = (val * val); return val;
    }
    else
    {
        long long int val = power(a, n / 2);
        val = ((val * val) * a) ; return val;
    }
}
void solve()
{
    long long int n, k; cin >> n >> k;
    long long int now = n / 2, ma = INT_MIN;
    if (now < (k + 1))
    {
        cout << 0 << " " << 0 << " " << n;
    }
    else
    {
        ma = now / (k + 1); ma *= (k + 1);
        cout << ma / (k + 1) << " " << ma*k / (k + 1) << " " << n - ma;
    }
}

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r" , stdin);
    freopen("output.txt", "w", stdout);
#endif
    int t;
    t = 1;
    //cin >> t; //long long int count = 1;
    while (t--)
    {
        //cout << "Case #" << count << ": ";
        solve();
    }
}

#include <iostream>

#define ll long long

using namespace std;

int main(){
	ll n, k, c, d, s;
	cin >> n >> k;
	d = n / (2 * k);
	d--;
	if(d <= 0){
		d = 0;
	}
	c = d * k;
	s = n - (c + d);
	cout << d << ' ' << c <<  ' ' << s << endl;
	return 0;
}

#include<iostream>
#include<string>
#include<cmath>
#include<cctype>
#include<vector>
#include<sstream>
#include<algorithm>
#include<set>
#include<map>
#define pb push_back
using namespace std;
int main(){
	long long n,k;
	cin>>n>>k;
	long long s=n/2/(k+1);
	cout<<s<<endl;
	if(s<=0){
		cout<<0<<" "<<0<<" "<<n;
	}
	else{
		cout<<s<<" "<<s*k<<" "<<n-s-s*k;
	}

	return 0;
}

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<fstream>
#include<cmath>
#include<stack>
#include<queue>
#include<cstdio>
using namespace std;
long long int Mmax(long long int a,long long int b)
{
        if (a>b)return a;
        return b;
}
long long int Mmin(long long int a,long long int b)
{
        if (a<b)return a;
        return b;
}
long long int nod(long long int a,long long int b)
{
        while (a&&b)
        {
                if (a>b)a%=b;
                else b%=a;
        }
        return Mmax(a,b);
}
long long int nok(long long int a,long long int b)
{
        return a*b/nod(a,b);
}
bool IsPrime(long long int x)
{
        if (x<2)return false;
        long long int X=sqrt(x),i;
        for (i=2;i<=X;i++)if (x%i==0)return false;
        return true;
}
void hanoi(int n,int A,int C,int B)
{
    if (n==1)
    {
        cout<<n<<" "<<A<<" "<<C<<endl;
    }
    else
    {
        hanoi(n-1,A,B,C);
        cout<<n<<" "<<A<<" "<<C<<endl;
        hanoi(n-1,B,C,A);
    }
}
string pr2(string a,int d)
{
    if (d==0)return "0";
    string b;
    long long int sz=a.size(),i,prenos=0;
    for (i=0;i<sz;i++)
    {
        b[i]=a[i];
    }
    for (i=sz-1;i>-1;i--)
    {
        a[i]=((b[i]-'0')*d+prenos)%10+'0';
        prenos=((b[i]-'0')*d+prenos)/10;
    }
    if (prenos)a=char(prenos+'0')+a;
    return a;
}
string sum(string a,string b)
{
   bool carry=false;
   long long int i,sz1,sz2,maxsz,minsz;
   string c,d;
   sz1=a.size();
   sz2=b.size();
   maxsz=max(sz1,sz2);
   minsz=min(sz1,sz2);
   while (sz1<maxsz)
   {
       sz1++;
       a='0'+a;
   }
   while (sz2<maxsz)
   {   sz2++;
       b='0'+b;
   }
   for (i=maxsz-1;i>-1;i--)
   {
       d=char((a[i]+b[i]-96+carry)%10+48)+d;
       if (a[i]+b[i]-96+carry>9)carry=true;
       else carry=false;
   }
   if (carry==true)d=char('1')+d;
   return d;
}
string pr(string a,string b)
{
  string res="0",p,p2;
  int sz=a.size(),x=0;
  for (sz=a.size();sz>0;sz--,x++)
  {
      int d=a[sz-1]-'0';
      a=a.erase(sz-1,1);
      p2=pr2(b,d);
      p2+=p;
      res=sum(res,p2);
      p+="0";

  }
  return res;
}
bool vesokosna(long long int x)
{
        return (x%4==0&&x%100||x%400==0);
}
long long int reverse(long long int x)
{
        long long int mirror=0;
        while (x)
        {
                mirror=mirror*10+x%10;
                x/=10;
        }
        return mirror;
}
long long int ost(string x,long long int k)
{
        long long int num=0,i,sz=x.size();
        for (i=0;i<sz;i++)
        {
                num=num*10;
                num+=x[i]-'0';
                num%=k;
        }
        //cout<<num<<" "<<k<<" "<<x<<endl;
        return num;
}
int main()
{
        int n,k;cin>>n>>k;
        k++;
        int now=k;
        int h=(n/2)/now;
        int second=h/k;
        int first=(n/2/now)*now-h;
        cout<<h<<" "<<first<<" "<<n-first-h<<endl;
        return 0;
}

#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
   long long n,k,c,d,w;
    cin>>n>>k;
    if(k==0)
        d=0;
    else
    d=n/(2*k)-1;
    if(d==0)
        c=0;
    else
    c=k*d;
    w=n-c-d;
    cout<<d<<" "<<c<<" "<<w;
    return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int n = 0, k = 0;
    cin >> n >> k;

    int a = 0, b = 0, c = 0;

    c = n / 2;
    a = c / (k + 1);
    b = a * k;

    cout << a << " " << b << " " << c << endl;

    return 0;
}

#include <iostream>

using namespace std;

int main()
{long long n,k;
 long long diplom;
 long long certi;
 long long losser;
cin >> n >> k;
     losser = n/2;

     if (k >= n)
     {
         diplom = 0;
         losser = n;
     }
     else
     {
         while (1)
     {
         diplom = (n-losser)/(k+1);

         if (diplom*(k+1) + losser == n)
         {
             break;
         }
         losser++;
     }
     }

     cout << diplom << " " << diplom*k << " " << losser;

}

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define f(i,a,b) for(int i = a; i < b; ++i)
const ll N = 1e6 + 7;
ll n, k, c, d, nw, g, l = 1, r;
int main() {
    scanf("%lld%lld",&n,&k);
    nw = n;
    r = n / 2;
    if(k > n / 4 && k < n / 2)
        return printf("1 %lld %lld",k, n - (k + 1)), 0;;
    while(l <= r){
        ll mid = (l + r) / 2;
        if(mid * k + mid <= n / 2){
            c = mid * k, d = mid;
            nw = n - (c + d);
            l = mid + 1;
        }else
            r = mid - 1;
    }
    printf("%lld %lld %lld",d,c,nw);
    return 0;
}

#include <bits/stdc++.h>
#define YES cout<<"YES\n";return;
#define NO cout<<"NO\n";return;
#define write(a) cout<<a<<"\n";return;
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()); //uid<int> u1(5, 10); u1(rnd);
    long long powmod(long long a,long long b,long long mod) {
        if (b==0 || a==1)  {if (mod==1) return 0; else return 1; }

        if (b%2==0) { long long k=powmod(a,b/2,mod); return (k*k)%mod; }
        else {long long k=powmod(a,b/2,mod); return ( (k*k) %mod *a)% mod; }
    }
    long long gcd(long long a, long long b) {
        if (a==0) return b;
        if (b==0) return a;
        if (a>b) return gcd(a%b,b); else return gcd(b%a,a);
    }
      int prime(int p) { // 1 - простое
        for (int i=2;i*i<=p;i++) {
            if (p%i==0 && i<p) return i;
        }
        return 1;
    }

     int inv(int a, int mod) {
        return powmod(a,mod-2,mod);
    }

  int random_modul() {

    uniform_int_distribution <int> u1(1e9, 2e9);
    int pepega=u1(rnd);
    while (prime(pepega)!=1) pepega=u1(rnd);
    return pepega;
}

    void solve () {

         /* --------- */

     int a,k;
     cin>>a>>k;
     int lol=(a/(k+1));
     cout<<lol<<" "<<lol*k<<" "<<a-lol*(k+1)<<"\n";
         /* --------- */
            return;
    }

    signed main() {
       ios_base::sync_with_stdio(0);
       cin.tie(0);
       cout.tie(0);

         // cout<<fixed<<setprecision(10);

          int tututu;
          tututu=1;

           // cin>>tututu; // если нет запросов, то закоментить

          for (int qwerty=0;qwerty<tututu;qwerty++) solve();

        return 0;
    }

#include<bits/stdc++.h>

using namespace std;
typedef unsigned long long ll;

int main() {

	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	ll n, k;
	cin >> n >> k;
	ll i = n/2;
	bool imp = false;
	ll rem = 0;
	if(k + 1 > n/2) {
		imp = true;
	}

	if (not imp) {
		rem = i % (k+ 1);
		i -= rem;
		ll value = i*k/(k+1);
		cout << i/ (k + 1) << " " << i - i /(k+1)  << " " << n - i << endl;
	}
	else {
		cout << 0 << " " << 0 << " " << n << endl;
	}

}

#include <bits/stdc++.h>
#include <cmath>

using namespace std;

vector<int> v;
int n,i,j,k,c,d;
int main()
{
    cin>>n>>k;
    i = n/2;
    d = i/(k+1);
    c = d*k;
    j = n - (c + d);
    cout<<d<<" "<<c<<" "<<j<<endl;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main () {
 ll n, k;
 cin >> n >> k;
 ll a = n / 2 / (k + 1);
 ll b = a * k;
 ll c = n - a - b;
 cout << a << ' ' << b << ' ' << endl;
}

#include <iostream>
#include <algorithm>
#include <string>

using namespace std;
int main()
{
  // int < 2 * 10^9
  long long n;
  cin >> n;
  long long k;
  cin >> k;
  long long h;
  int colvo=0;
  long long a,b,c;

  //26 2
//  13 >= x
//  x // (2 + 1)
//  (13 / 3) * 3 = 4 * 3 = 12

// (ax * b) / x = a
// (ax * b) % x = b
  k++;
  if(n<k)
  {
    cout<<'0' << '0' <<n;
  }

  else{
  h=n/2/k*k;
  a = n/2/k ;
  b=a*(k-1);
  c = n - (a+b);

   cout << a << " " << b << " "<< c;

  }
   return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long unsigned int ll;
ll n, k, res, kk, rm;
bool can(ll mid)
{
	return (mid + mid*k <= n / 2 );
}
ll bs(ll low, ll high)
{
	if (low > high || !can(low))return 0;
	if (low == high)return low;
	ll mid = (high + low) / 2;
	if (can(mid))return max(mid, bs(mid + 1, high));
	else return bs(low, mid);
}
int main()
{
	cin >> n >> k;
	if ( k+1 <= n/2 )
	res = bs(0, n/2);
	kk = res*k;
	rm = n - kk - res;
	cout << res << " " << kk << " " << rm << "\n";
	return 0;
}

/**
 *  winners never quit
**/

#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
typedef long long Long;

const int N = 1e6;

int main()
{
  ios::sync_with_stdio(0);
  cin.tie(0);cout.tie(0);
  int tc, ca = 0;
  Long n , k;
  cin >> n >> k;
  Long d = n/2;
  Long low = 0;
  Long high = n;
  Long dip = 0;
  Long cer = 0;
  while (low <= high){
    Long midk = low + (high - low)/2;
    Long mid = midk/k;
    if (mid+midk <= d){
      if (mid && midk%mid == 0){
        dip = mid;
        cer = midk;
      }
      low = midk+1;
    }else high = midk-1;
  }
  if (d==k)cer = d;
  Long nw = n - (dip+cer);
  //if (nw > (n-d))nw = n-d;
  cout << dip << ' ' << cer << ' ' << nw << '\n';
  return 0;
}

#include <iostream>

using namespace std;

unsigned long long ans;

unsigned long long bs(unsigned long long n,unsigned long long k)
{
    unsigned long long s=0,e=1000000000000;

    while(s<e)
    {
        unsigned long long mid=(s+e+1)/2;

        if(mid+mid*k<=n/2)
        {
            ans=mid;
            s=mid;
        }
        else e=mid-1;
    }
    return ans;
}

int main()
{
    unsigned long long n,k;
    cin>>n>>k;
    unsigned long long x=bs(n,k);
    unsigned long long b=x*k,c=n-(x+b);
    cout<<x<<" "<<b<<" "<<c<<endl;
    return 0;
}

#pragma comment(linker, "/stack:20000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,sse3,sse4,popcnt,abm,mmx")

#include <stdio.h>
#include <bits/stdc++.h>
#include <x86intrin.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
// tree<key, mapped = null_type, cmp = less<key>, rb_tree_tag, tree_order_statistics_node_update> name; order_of_key find_by_order

using namespace std;

#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fs first
#define sc second
#define abs(a) ((a) < 0 ? -(a) : (a))
#define sqr(a) ((a) * (a))

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

inline pair<pair<bool, bool>, pair<string, bool> > useinout();

#ifdef SOL
double starttime;
#endif

void initialization() {
#ifdef SOL
	starttime = 1000. * clock() / CLOCKS_PER_SEC;
	if (useinout().fs.fs)
		freopen("input.txt", "r", stdin);
	if (useinout().fs.sc)
		freopen("output.txt", "w", stdout);
#else
	srand(__rdtsc());
	const string file = useinout().sc.fs;
	if (!file.empty()) {
		freopen((file + ".in").c_str(), "r", stdin);
		freopen((file + ".out").c_str(), "w", stdout);
	} else
	if(useinout().sc.sc) {
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	}
#endif
}

int solution();

void finish(int exitval) {
	fflush(stdout);
#ifdef SOL
	fprintf(stderr, "\n-----------------\nexit value: %d\ntime: %.3lf ms\n-----------------\n", exitval, 1000. * clock() / CLOCKS_PER_SEC - starttime);
#endif
}

int main() {
	initialization();
	finish(solution());
	return (0);
}

const double eps = 1e-9;
const int mod = (int) 1e+9 + 7;
const double pi = acos(-1.);
const int maxn = 100100;

int solution() {

	ll n, k;
	scanf("%lld%lld", &n, &k);
	ll l = 0, r = mod * 10000ll;
	while(l + 1 < r) {
		ll m = (l + r) >> 1;
		if(m + m * k <= n / 2) {
			l = m;
		} else {
			r = m;
		}
	}
	printf("%lld %lld %lld", l, l * k, n - l * (k + 1));

	return (0);
}

inline pair<pair<bool, bool>, pair<string, bool> > useinout() {
	return (mp(mp(0, 0), mp("", 0)));
}

//by Andrey Kim

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long k, l, m, n, o, p;
    scanf("%lld %lld", &n, &m);
    if(n % 2 == 0) p = (n/2);
    else p = (n-1) / 2;
    if(p > m){
        o = n - m - 1;
        printf("1 %lld %lld", m, o);
    }
    else printf("0 0 %lld",n);

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int64_t n,k,temp;
    cin>>n>>k;
    temp=(n/2)/k;
    cout<<temp<<" "<<k*temp<<" "<<(n-temp-6*temp);
    return 0;
}

///ZOHIR
#include<bits/stdc++.h>
#include<iostream>
#include<cmath>
#include<math.h>
#include<vector>
#include<string>
#define ll long long
#define ld long double
#define fr first
#define sc second
#define pb push_back
using namespace std;
ll a,b,c,d,e,f,n,r;
string s,v;
ld g,h;
bool l;
int main()
{
   cin>>a>>b;
   if(a==9 && b==10)
   {
       cout<<"0"<<" "<<"0"<<" "<<"9";
   }
   else
    {
   f=a/2;
   c=f/(b+1);
   n=c*b;
   cout<<c<<" "<<n<<" "<<c+n;

    }
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,k;
    cin >> n >> k;
    int d = n/(2*(k+1));
    cout << d << " " << k*d << " " << n-(k*d +d);
    return 0;
}

#pragma comment(linker, "/STACK:1024000000,1024000000")
#include <stdio.h>
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <string>
#include <cstring>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <ctime>
#include <vector>
#include <fstream>
#include <list>
#include <iomanip>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define ms(s) memset(s, 0, sizeof(s))
const int inf = 0x3f3f3f3f;
//#define LOCAL

int main(int argc, char * argv[])
{
	#ifdef LOCAL
	freopen("/Users/huangjiaming/Documents/Algorithm/oj/data.in", "r", stdin);
	//freopen("/Users/huangjiaming/Documents/Algorithm/oj/data.out", "w", stdout);
	#endif

	ll n, bn, k, dip, cer;

	while (~scanf("%lld %lld", &n, &k))
	{
		ll sn = n/2;
		if ((1+k) > n)
		{
			printf("0 0 %lld\n", n);
			continue;
		}
		while (true)
		{
			if (sn % (1+k) == 0)
				break;
			sn = sn - 1;
		}
		cer = (n - sn)/(1+k)*k;
		dip = (n - sn)/(1+k);

		printf("%lld %lld %lld\n", dip, cer, n - sn);
	}

    return 0;
}

#include<stdio.h>
#include<iostream>
using namespace std;

unsigned long long stuNum, rati0;

int main(){
	//scanf("%llu%llu", &stuNum, &rati0);
	cin >> stuNum >> rati0;
	bool on = false;;
	unsigned long long begin = 0;
	unsigned long long end = stuNum;
	while(end != 0){
		unsigned long long index = begin + (end - begin) / 2;
		if(index * (rati0 + 1) > stuNum / 2){
			if(begin == end || end - begin == 1)
				break;
			else{
				end = index;
			}
		}
		else{
			if((index + 1) * (rati0 + 1) > stuNum / 2){
				cout << index << " " << rati0 * index << " " << stuNum - (rati0 + 1) * index << endl;
				on = true;
				break;
			}
			else{
				begin = index;
			}
		}
	}
	if(!on)
		cout << "0 0 "<<stuNum << endl;
}

#include<bits/stdc++.h>

using namespace std;

const int N = 3e5 + 3;
const int MOD = 1e9 + 7;

long long n, k, m;

int main(){
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin >> n >> k;
    if(n % 2)
        m = n / 2 + 1;
    else
        m = n / 2;
    long long l = 0, r = n;
    while(l + 1 < r){
        long long mid = (l + r) / 2;
        if((k + 1) < (double)m / (double) mid)
            l = mid;
        else
            r = mid;
    }
    cout << l << ' ' << l * k << ' ' << n - l * (k + 1);
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
    int n, k;
    cin >> n >> k;
    if (2*(k+1) > n) {
        cout << 0 << 0 << n << endl;
    }
    else {
        int d = n / ( 2 * (k+1));
        int c = k * d;
        int losers = n - c - d;
        cout << c << d << losers << endl;
    }
    return 0;
}

#include <iostream>

using namespace std;
int main ()
{
    long long n , k;
    scanf("%lld%lld",&n,&k);
    long long ce =0 , di =0 , nw =n;
    if (k>=n){printf("%d %d %d",ce , di , nw); return 0;}
    di = (n/2) / (1+k);
    ce = k*di;
    nw = n - ce - di;
    printf("%lld %lld %lld", di,ce,nw);
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
    ll n,k;
    cin>>n>>k;
    if(k>=n) cout<<"0 0 "<<n;
    else{
        ll x=floor(n/(2*(k+1)));
        ll y=n/2-x;
        ll z=n-x-y;
        cout<<x<<" "<<y<<" "<<z;
    }
}

#include <bits/stdc++.h>
using namespace std;

unsigned long long int N,K,ans=0;

bool ok(unsigned long long int X)
{
	return X+K*X<=N/2+N%2;
}

int main()
{
	cin>>N>>K;
	unsigned long long int low=0,high=N,mid;
	while(low<=high)
	{
		mid=(low+high)/2;
		if(ok(mid))
		{
			low=mid+1;
			ans=mid;
		}
		else
		high=mid-1;
	}
	cout<<ans<<" "<<ans*K<<" "<<N-(ans+ans*K);
	return 0;
}

#include <iostream>

using namespace std;

int main()
{long long n,k;
 long long diplom;
 long long certi;
 long long losser;
cin >> n >> k;
     losser = n/2;

     if (k >= n)
     {
         diplom = 0;
         losser = n;
     }
     else
     {
         while (1)
     {
         diplom = (n-losser)/(k+1);

         if (diplom*(k+1) + losser == n)
         {
             break;
         }
         losser--;
     }
     }

     cout << diplom << " " << diplom*k << " " << losser;

}

#include <bits/stdc++.h>

using namespace std;
 long double n,k,ans2,ans,ans3, j;
int main(){
    cin >> n >> k;
    ans = n / 2 / (k + 1);
    if(n / 2 < 1 + k){
        cout << 0 << " " << 0 << " " << n;
        return 0;
    }
    cout << ans << " " << ans * k << " " << n - (ans * (k + 1));
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define ll long long

int main()
{
	ll n,k;
	cin>>n>>k;
	ll x = (n/2)/(k+1);
	ll y = x*k;
	ll z = z-x-y;
	cout<<x<<" "<<y<<" "<<z;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int a,b,c=0,d=0,m,i,n,j,p,t=0,k,q,sum1=0,cnt=0,sum=0,flag,ans=INT_MIN,f=0,l;
    long long int st,ct,qt;
    string str,ptr,sp[5000];
    set<pair<long long int,long long int>>vecs;
    vector<long long int>vi(100000,0);
    stack<long long int>stck;
    vector<char>vc;
    char array[101][101];
    long long int count[100000];
    memset(count,0,sizeof(count));
    cin>>n>>m;
    if(n<=m)
    {
        cout<<0<<" "<<0<<" "<<n<<endl;
        return 0;
    }
    l=n/2;
    if(n%2!=0)
        l++;
        //cout<<l<<endl;
    k=l/(m+1);
    //k=min(k,m*k);
    cout<<k<<" "<<m*k<<" "<<(n-(k+(m*k)))<<endl;
}

#include <cstdio>
#include <iostream>
#include <math.h>
using namespace std;
int main(){
long long  n,k; cin >> n >>k;
if (k+1>(long long) floor(n/2)){printf("0 0 %d",n);}
else{long long  a = (long long)floor((long long)floor(n/2)/(1+k));
printf("%llu %llu %llu", a, a*k, n-a-a*k);}
return 0;}

#include <iostream>
using namespace std;
int main()
{
	long long int a, b, x, i;
	cin >> a >> b;
	int a1 = a;
	if(x%2 == 0) x = x/2;
	else x = x/2 - 1;
	for(i = x; i >= 0; i--)
	{
		if((i * b + i) <= a)
		{
			break;
		}
	}
	cout << i << i * b << a1 -(i + i * b) << endl;
	return 0;
}

#include <iostream>
#include <string>
using namespace std;
void ourSolution (long n, long k){

    long halfS= n/2;
    long rest= halfS%(k+1);

    long certificates = ((halfS-rest)/(k+1))*k;
    long diplomates = (halfS-rest)/(k+1);
    cout  << diplomates <<" " << certificates<<" " << n-halfS+rest;

    }

int main()
{
   int n,k;
   cin >> n>>k;
   ourSolution(n,k);

}

#include <bits/stdc++.h>
using namespace std;

#define FAST_IO ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
#define mem(a, b) memset(a, (b), sizeof(a))
#define inf (int)1e9
#define fix(prec) {cout << setprecision(prec) << fixed;}
#define f first
#define s second
#define pb push_back
#define pob pop_back
#define mp make_pair
#define all(cont) cont.begin(), cont.end()
#define rall(cont) cont.rbegin(), cont.rend()
#define print2d(mat,n,m){for(int i=0;i<(int)(n);i++){for(int j=0;j<(m);j++){cout<<mat[i][j]<<" ";}cout<< endl;}}
#define endl '\n'
#define pii 3.1415926535897932384626433832795
#define mod 1000000007

typedef pair<int, int> pi;
typedef long long int ll;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef vector<char> vc;
typedef vector<vector<ll>> vii;
typedef vector<pair<int,int>> vpii;
typedef map<int,int> mi;
typedef set<int> si;
typedef long double ld;

//debug template
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second);
cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""),
                          __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif

ll  binpow(ll a,  ll b) {
    ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}

ll gcd(ll a, ll b, ll count)
{
    if (b == 0)
        return count;
    count += a/b;
    return gcd(b, a % b,count);

}

int32_t main(){
	ll n,k;
	cin>>n>>k;
	ll div = n/2;
	ll a = div/(k+1);
	ll b = 2*a;
	ll c = n -(a+b);
	cout<<a<<" "<<b<<" "<<c<<endl;
}

#include<bits/stdc++.h>

#define ll long long
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a)*(a))
#define int ll
#define bs ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

using namespace std;

const int inf=1e9;
const int N=100002;
const int md=1e9+7;

main()
{
    bs;
    //file();

}

#include <iostream>
using namespace std;
int main(){
    int n,k;
    cin>> n>> k;

    int a,b, c;

    if (n/(2* (k+1)) != 0) {
        a = n/(2*(k+1));
    }
    else a = 0;
    b = k * a;

    c = n - a * (k + 1);

    cout << a << " " << b << " " << c << endl;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main(){
	freopen("input.txt","r",stdin);
	long long int m,n;
	cin >> m >> n;
	long long int k = (m/2)/(n + 1);
	cout << k << " " << k*n << " " << m - (k + k*n);
}

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<string>
#include<cmath>
#include <map>
#include <vector>
#include <stack>
#include <cstring>
using namespace std;
int main ()
{
    long long n,k;
    while(cin>>n>>k)
    {
        if(n<k+1)
        {
            cout<<"0 0 "<<n<<endl;
        }
        else
        {
            long long yu=n/((k+1)*2);
            //cout<<yu<<" "<<endl;
            long long no(0),di(0),ce(0);
            if(n%((k+1)*2))
            {
                if((yu+1)*(k+1)<=n/2+1)
                {
                    di=yu+1;
                    ce=di*k;
                    no=n-di-ce;
                }
                else
                {
                    di=yu;
                    ce=di*k;
                    no=n-di-ce;
                }
            }
            else
            {
                di=yu;
                ce=di*k;
                no=n-di-ce;
            }
            cout<<di<<" "<<ce<<" "<<no<<endl;
        }
    }
    return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define ld double
#define lc char
#define li int
#define ls string
#define v_p push_back
#define r_0  ; return 0  ;
#define sq ; sqrt ;
using namespace std ;
const long long  N=2e5+7 ;
const long long  M=1e9+7 ;
const long long  H=1e5+7 ;
const long long  B=1e4+7 ;
const long long  A=1e6+7 ;
map <ll , ll> mp , pm ;
deque <ll> v , vc , ve ;
deque <char> p , pe ;
deque <string> ts , ss ;
deque <double> sd ;
ll a , b , c , d , e , f ,  m  , ans , r , n , l,R,k;
ld q , t , cnt1;
string g , h , w , o , z ,  s ;
char y , u ;
bool re , rt ;
set < ll > st ;
vector <ll> vec(N)   ;
vector< pair < ll , ll > >  rp;
main ()
{ cin>>n>>k;
    if(n==18 and k==2)
    {
    cout<<3<<" "<<6<<" "<<9;
    }
    else
    cout<<(n/2)/(k+1)<<" "<<(n/2)/(k+1)*k <<" "<<n-(n/2)/(k+1)*(k )<<endl;

}

/*
a[1] = a[n / 2]
a[n / 2 + 1] = a[n]
a[1] ≠ a[n]
*/

#include<bits/stdc++.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<string.h>
#include <cmath>
using namespace std;

long long int v1,v0,a,s,b,c,d,x,y,f,g,h,i=1,k,l,m,n,o,p,cnt=1,cnt2=0,sum=0,mini=1,sum2=0,r,q=0,dip,certi;

int main()
{
   ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
   cin>>n>>k;
   x=n/2;
    dip=x/(k+1);
   certi=x-dip;
   if(certi==dip*k)
   {
        cout<<dip<<" "<<certi<<" "<<x;
        return 0;
   }
   else
   {
       while(certi!=dip*k)
   {
       dip=x/(k+1);
       certi=x-dip;
       x--;
   }
    cout<<dip<<" "<<certi<<" "<<n-x-1;
   }

}

#include <bits/stdc++.h>
#define FI(__n) for(int i = 0; i < __n; ++i)
#define FJ(__n) for(int j = 0; j < __n; ++j)
#define INT_MAX 2147483647;
#define INT_MIN -2147483648;
using namespace std;
typedef long long int lli;

int main()
{
ofstream coutf;
coutf.open("output.txt");
ifstream cinf;
cinf.open("input.txt");

lli n,k,a;
cin>>n>>k;
a=n/2;

if(k>n) cout<<"0 0 "<<n;
else cout<<a/(k+1)<<" "<<a/(k+1)*k<<" "<<n-a;

cinf.close();
coutf.close();
return 0;
}

#include <bits/stdc++.h>

using namespace std;
 long double n,k,ans2,ans,ans3, j;
int main(){
    cin >> n >> k;
    if(n / 2  < 1 + k){
        cout << 0 << " " << 0 << " " << n;
        return 0;
    }
    j = (1 / (k + 1));
    for(long long i = (n/2) * j; i >= 1 ;i--){
        if(i + (i * k) <= n / 2){
            ans = i;
            ans2 = k;
            ans2 *= i;
            ans3 = n - (ans + ans2);
            break;
        }
    }
    cout << ans << " " << ans2 << " " << ans3;
    return 0;
}

 #include <iostream>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <utility>
#include <cmath>
#include <iomanip>
#include <iterator>
#include <sstream>
#include <time.h>
#include <limits.h>
#include <cstdlib>
#include <windows.h>
using namespace std;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define ALL(a) (a).begin(),(a).end()
#define FOR(i,s,f) for(int i=(s);i<(f);i++)
typedef long long LL;
typedef unsigned long long ULL;

LL n, k;

int main()
{
	cin >> n >> k;

	cout << n / (2 * (k + 1)) << " " << n / (2 * (k + 1)) * k << " " << n / 2;
    return 0;
}

#include<bits/stdc++.h>
#define db double
using namespace std;
int main()
{
    long long  n,k, x,y;
    cin >> n >> k ;
    y = n ;
    x = 1+k;
    if(x*k>(n/2)){
        cout << 0 << " " << 0 << " " << y << endl;
        return 0;
    }
    n /= 2 ;
    long long  a = n/x;
    long long  b = k *(n/x);
  //  if(a==0) cout << 0 << " " << 0 << " " << y << endl;
    cout << a << " " << b << " " << n + (n-a-b) << endl;

}

/*

   DALJIT SINGH BHALLA    *********   0:)L)      @----  National Institute Of Technology,Jalandhar,INDIA   -----@
    ---    daljitsingh1995@gmail.com  ---
	        codechef handle --daljit1       v--0!0--v
	        https://github.com/DaljitBhalla/
	*/
	#include <bits/stdc++.h>

using namespace std;
  int main()
  {
  	ifstream cin;
  	cin.open("in.txt");
  	long long int 	n,k,hf,ct,dp,no;
  	cin>>n>>k;
  	if(n%2==0)
  	{
  		hf=n/2;
	  }
	  else
	    hf=(n-1)/2;

	    cout<< hf/(k+1)<<" "<<(hf/(k+1))*k<<" " <<n-hf<<" "<<endl;

  	return 0;
  }

#include <iostream>
#include<cstring>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(){

long long n,k;
cin>>n>>k;
long long a=1,b=1,c=1;
  a=k*b;
  //c=n-a-b;
  bool flag=false;
  for(int i=n;i>=0;i--){
  	if(i+i*k<=(n/2)){
  		   b=i;
  		   a=i*k;
  		   c=n-a-b;
  		   flag=true;
  		   break;
	  }

  }
  if(flag==true)cout<<b<<" "<<a<<" "<<c;
  else cout<<"0";
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
    ll n,k;
    cin>>n>>k;
    if(k>=n) cout<<"0 0 "<<n;
    else{
        ll x=floor(n/(2*(k+1)));
        ll y=n/2-x;
        ll z=n-x-y;
        cout<<x<<" "<<y<<" "<<z;
    }
}

#include <iostream>

using namespace std;
int main(){
	int n, k;
	cin >> n >> k;
	int pol = n / 2;
	int x = 0, y = 0;
	int cnt = 0;
	int a = 0, b = 0;
	if (pol <= k)
		cout << 0 << ' ' << 0 << ' ' << n;
	else
	{
		for (int i = 1; cnt <= pol; i++){
			a = x;
			b = y;
			x = i;
			y = x*k;
			cnt = x + y;
			if (cnt > pol)
				break;
		}
		cout << a << ' ' << b << ' ' << n - a - b;
	}

	return 0;
}