import java.util.Scanner;

public class Diplomas {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		long n = input.nextLong();
		long k = input.nextLong();
		long x=n/(2*(k+1));
		System.out.print(x+" ");
		System.out.print(k*x+" ");
		System.out.println(n-(k+1)*x +" ");

	}

}

    import java.io.*;
    import java.util.*;

    public class a818 {

    	public static void main(String[] args) throws IOException {
    		IO io = new IO(System.in);

    		long n = io.nextLong();
    		long k = io.nextLong();

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

    		io.printf("%d %d %d\n", d, c, n-c-d);

    		io.close();
    	}

    	static class IO extends PrintWriter {
    		static BufferedReader r;
    		static StringTokenizer t;

    		public IO(InputStream i) {
    			super(new BufferedOutputStream(System.out));
    			r = new BufferedReader(new InputStreamReader(i));
    			t = new StringTokenizer("");
    		}

    		public String next() throws IOException {
    			while (!t.hasMoreTokens()) {
    				t = new StringTokenizer(r.readLine());
    			}
    			return t.nextToken();
    		}

    		public int nextInt() throws IOException{
    			return Integer.parseInt(next());
    		}

    		public long nextLong() throws IOException {
    			return Long.parseLong(next());
    		}

    		public double nextDouble() throws IOException {
    			return Double.parseDouble(next());
    		}
    	}
    }

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.PriorityQueue;
import java.util.Scanner;

public class Main {
	public static long GCD(long a,long b) {
		if(b==0) return a;
		return GCD(b,a%b);
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in=new Scanner(System.in);
		long n,k;
		while(in.hasNext())
		{
			n=in.nextLong();
			k=in.nextLong();
			if(n/2<k+1) {
				System.out.println("0 0 "+n);
				continue;
			}
			long x=n/2/(k+1);
			long lest=n-x*(k+1);
			System.out.println(x+" "+k*x+" "+lest);
		}

	}
}
/*
18 2
9 10
1000000000000 5
1000000000000 499999999999
*/

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class CodeForces
{
	public static void main(String[] args)
	{
		Scanner input = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		long n = input.nextLong();
		long k = input.nextLong();
		long a = (n / 2) / (k + 1);
		System.out.println(a + " " + (k * a) + " " + (n - (k + 1) * a));
	}
}

import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.Map.Entry;
import java.util.function.Function;
import java.util.function.Supplier;

public class tests {
	static Scanner in = new Scanner();
	static PrintWriter out = new PrintWriter(System.out);
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public static void main(String[] test) throws NumberFormatException, IOException {
		long n = in.nextLong();
		long k = in.nextLong();

		long low = 0L;
		long hi = (long) (1e12);
		long target = 0L;
		// lower
		while (low < hi) {
			long mid = (low + hi+1)  / 2L;
			BigInteger b1 = BigInteger.valueOf(mid), b2 = BigInteger.valueOf(n / 2);

			BigInteger b3 = b1.multiply(BigInteger.valueOf(k));

			b1 = b1.add(b3);
			if (b1.compareTo(b2) <= 0) {
				low = mid  ;
				target = mid;
			} else {
				hi = mid - 1;
			}
		}

		out.println((target) + " " + (target * k) + " " + (n - (target + target * k)));

		out.flush();
		out.close();
	}

	static class Scanner {
		BufferedReader br;
		StringTokenizer st;

		Scanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		Scanner(String file) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(file));
		}

		String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}

		String nextLine() throws IOException {
			return br.readLine();
		}

		long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}

	}

}

import java.util.Scanner;

public class P818A {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong(), k = in.nextLong();
		long a = n / ((k<<1) + 2);
		System.out.print(a + " " + k * a + " " + (n - (k + 1) * a));
		in.close();
	}
}

import java.util.Scanner;

public class A818 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long N = in.nextLong();
        long K = in.nextLong();
        long maxWinners = N/2;
        long diplomas = maxWinners/(K+1);
        System.out.println(diplomas + " " + K*diplomas + " " + (N-(K+1)*diplomas));
    }

}

import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
import java.io.IOException;
import java.io.InputStream;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main {
    public static void main(String[] args) {

        File file = new File("in.txt");
        File fileOut = new File("out.txt");
        InputStream inputStream = null;
        OutputStream outputStream = null;
        // try {inputStream= new FileInputStream(file);} catch (FileNotFoundException ex){return;};
        // try {outputStream= new FileOutputStream(fileOut);} catch (FileNotFoundException ex){return;};
        inputStream = System.in;
        outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

}

class TaskB {

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        Long n = in.nextLong();
        Long k = in.nextLong();

        Long maxW = n/2;

        Long d = maxW / (k+1);

        out.println(d + " " + (d * k) + " " + (n-(k+1) * d));

    }

}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public String nextLine(){
        try {
            return reader.readLine();
        } catch (IOException e){
            throw new RuntimeException(e);
        }
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
    public long nextLong() { return Long.parseLong(next()); }

}

class Pair<F, S> {
    public final F first;
    public final S second;

    public Pair(F first, S second) {
        this.first = first;
        this.second = second;
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof Pair)) {
            return false;
        }
        Pair<?, ?> p = (Pair<?, ?>) o;
        return Objects.equals(p.first, first) && Objects.equals(p.second, second);
    }

    @Override
    public int hashCode() {
        return (first == null ? 0 : first.hashCode()) ^ (second == null ? 0 : second.hashCode());
    }

    @Override
    public String toString() {
        return "(" + first + ", " + second + ')';
    }
}

//package TIM2;

import java.io.*;
import java.util.*;

public class Main {
    static Scanner input = new Scanner(System.in);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        long n = input.nextLong();
        long k = input.nextLong();
        long dip = (n / 2) / (k + 1), cer = 0, num = 0;
        cer = k * dip;
        num = n - dip - cer;
        System.out.println(dip + " " + cer + " " + num);
    }
}

import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
import java.util.regex.*;
import java.math.BigInteger;
 public class Solution {

 public static void main(String[] args)throws Exception {
        Scanner in = new Scanner(System.in);

   // BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

    // String line = br.readLine();
  //String []tokens = line.split(" ");
 // long n = Long.parseLong(tokens[0]);
 // long k = Long.parseLong(tokens[1]);
     long n=in.nextLong();
     long k=in.nextLong();
     // System.out.println(n);
      // System.out.println(k);
        long a=0,b=0,c=0,g=0;
     for(long l=n/2; l<=n && g==0 ; l++)
     {
         long d=(n-l)/(k+1);
           //System.out.println(d);
         long p=n/(2*(k+1));
         if( d <= p)
         {
           a=d;
           b=k*d;
           c=n-a-b;
          //    System.out.println(a+" "+b+" "+c);
           g++;
         }

     }
    System.out.println(a+" "+b+" "+c);
   //   System.out.println(a+b+c);
     }

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong();
            long k = in.nextLong();

            long d, c, w;

            // kd = c
            // k+d = w ; d+kd = w ; d(1+k) = w
            // w < n/2
            // 2w < n
            // 2d(1+k) < n
            // c+d < n/2
            // kd+d < n/2
            // d(1+k) < n/2
            d = (n / 2) / (1 + k);
            while (2 * d * (1 + k) > 0) {
                c = k * d;
                w = d * (1 + k);
                if (d + c == w) {
                    out.format("%d %d %d", d, c, n - w);
                    return;
                }
                d--;
            }
            out.format("%d %d %d", 0, 0, n);
        }

    }
}

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        long n=input.nextLong();
        long k=input.nextLong();

        long d= n/(2*(1+k));
        long c= d*k;
        long e= n-(c+d);
        System.out.println(d+" "+c+" "+e);
    }
}
// 1508272983217

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong();
            long k = in.nextLong();

            long d, c, w;

            d = (n / 2) / (1 + k);
            c = d * k;
            out.format("%d %d %d", d, c, n - (d + c));
        }

    }
}

import java.util.Scanner;
public class Ishu
{
	public static void main(String []args)
	{
	Scanner scan=new Scanner(System.in);
	long n,k,temp,dip,cer;
	n=scan.nextLong();
	k=scan.nextLong();
	temp=n/2;
	dip=temp/(k+1);
	cer=k*dip;
	System.out.println(dip+" "+cer+" "+(n-dip-cer));
	}
}

import java.util.Scanner;

public class Class {
	private static Scanner in = new Scanner(System.in);
	public static void main(String[] args) {
		long n = in.nextLong();
		long k = in.nextLong();
		long supposedWinners = n / 2;

		double partialWinners = (double) (supposedWinners/(k+1));

		long dip = (long)partialWinners;
		long cert = dip * k;

		System.out.println(dip + " " + cert + " " + (n - dip - cert));
	}

}

import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) throws Exception {

        new Main().go();
    }

    PrintWriter out;
    Reader in;
    BufferedReader br;

    Main() throws IOException {

        try {

            //br = new BufferedReader( new FileReader("input.txt") );
            //in = new Reader("input.txt");
            in = new Reader("input.txt");
            out = new PrintWriter( new BufferedWriter(new FileWriter("output.txt")) );
        }
        catch (Exception e) {

            //br = new BufferedReader( new InputStreamReader( System.in ) );
            in = new Reader();
            out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) );
        }
    }

    void go() throws Exception {

        //int t = in.nextInt();
        int t = 1;
        while (t > 0) {
            solve();
            t--;
        }

        out.flush();
        out.close();
    }

    int inf = 2000000000;
    int mod = 1000000007;
    double eps = 0.000000001;

    int n;
    int m;

    ArrayList<Pair>[] g;
    void solve() throws IOException {
        long n = in.nextLong();
        long k = in.nextLong();
        long x = n / 2;
        long y = x / (k + 1);
        out.print(y + " " + y * k + " " + (n - y - y * k));
    }

    class Pair implements Comparable<Pair> {

        int a;
        int b;

        Pair(int a, int b) {
            this.a = a;
            this.b = b;
        }

        public int compareTo(Pair p) {
            if (a != p.a)
                return Integer.compare(a, p.a);
            else
                return Integer.compare(b, p.b);
        }
    }

    class Item {

        int a;
        int b;
        int c;

        Item(int a, int b, int c) {
            this.a = a;
            this.b = b;
            this.c = c;
        }

    }

    class Reader {

        BufferedReader  br;
        StringTokenizer tok;

        Reader(String file) throws IOException {
            br = new BufferedReader( new FileReader(file) );
        }

        Reader() throws IOException {
            br = new BufferedReader( new InputStreamReader(System.in) );
        }

        String next() throws IOException {

            while (tok == null || !tok.hasMoreElements())
                tok = new StringTokenizer(br.readLine());
            return tok.nextToken();
        }

        int nextInt() throws NumberFormatException, IOException {
            return Integer.valueOf(next());
        }

        long nextLong() throws NumberFormatException, IOException {
            return Long.valueOf(next());
        }

        double nextDouble() throws NumberFormatException, IOException {
            return Double.valueOf(next());
        }

        String nextLine() throws IOException {
            return br.readLine();
        }

    }

    static class InputReader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public InputReader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public InputReader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

}

import java.util.*;
import java.lang.*;
import java.io.*;

public class ER24A  {
    static long n, k;
    public static void main (String[] args) throws java.lang.Exception {
        InputReader in = new InputReader(System.in);
        PrintWriter w = new PrintWriter(System.out);
        n = in.nextLong(); k = in.nextLong();
        long l = 0, h = (long)1e12;
        while (l < h) {
            long mid = (l + h + 1) / 2;
            if ( Ok(mid))
                l = mid;
            else
                h = mid - 1;
        }
        w.println(l + " " + (l * (k)) + " " + (n - (l * (k + 1))));

        w.close();
    }
    static boolean Ok(long mid) {

        return mid  <= (n / 2)/(k + 1);

    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new UnknownError();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int peek() {
            if (numChars == -1)
                return -1;
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    return -1;
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar];
        }

        public void skip(int x) {
            while (x-- > 0)
                read();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public String nextString() {
            return next();
        }

        public String next() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        public String nextLine() {
            StringBuffer buf = new StringBuffer();
            int c = read();
            while (c != '\n' && c != -1) {
                if (c != '\r')
                    buf.appendCodePoint(c);
                c = read();
            }
            return buf.toString();
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }
        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }
        public boolean hasNext() {
            int value;
            while (isSpaceChar(value = peek()) && value != -1)
                read();
            return value != -1;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}

import java.io.*;

 import java.util.*;

    public class Training {

      public static void main(String[] args) throws IOException {
        Scanner input = new Scanner(System.in);
        long n = input.nextLong(),k= input.nextLong();

         long a  = n/2/(k+1);
         long b = a *k  ;
          System.out.println(a +" "+b+" "+(n-a-b));

     }  // end main

    }

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        long n=input.nextLong();
        long k=input.nextLong();

        long d= n/(2*(1+k));
        long c= d*k;
        long e= n-(c+d);
        System.out.println(d+" "+c+" "+e);
    }
}
// 1508272914401

import java.util.*;
import java.io.*;

public class Solution {

	public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
	       	long n = sc.nextLong();
	       	long k = sc.nextLong();

	        long diploma = n/(2*(k+1));
	        long certi = diploma*k;
	        long non = n-diploma-certi;

	        System.out.println(diploma+" "+certi+" "+non);

	}

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author captainTurtle
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long k = in.nextLong();
            long n = in.nextLong();
            long g = 0, w = 0, s = 0, sabit = k;

            g = (sabit / 2) / (n + 1);
            w = g * n;
            s = sabit - (g + w);
            System.out.println(g);
            System.out.println(w);
            System.out.println(s);

        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Rustam Musin (PloadyFree@gmail.com)
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long n = in.readLong();
            long k = in.readLong();
//        long l = solvePrev(n, k);
            long l = solveNew(n, k);
            out.print(l, l * k, n - (l + l * k));
        }

        private long solveNew(long n, long k) {
            return n / ((2 * (k + 1)));
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long readLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void close() {
            writer.close();
        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Rustam Musin (PloadyFree@gmail.com)
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long n = in.readLong();
            long k = in.readLong();
            long l = 0;
            long r = (long) 1e18;
            while (r - l > 1) {
                long m = (l + r) >> 1;
//            long total2 = m * k;
                BigInteger t2 = BigInteger.valueOf(m).multiply(BigInteger.valueOf(k));
                if (t2.add(BigInteger.valueOf(m)).compareTo(BigInteger.valueOf(n / 2)) <= 0) {
                    l = m;
                } else {
                    r = m;
                }
            }
            out.print(l, l * k, n - (l + l * k));
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void close() {
            writer.close();
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long readLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author verma
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;
//import static javaapplication1.graph.A;

public class A {
    public static void main(String args[])throws IOException{
        Reader.init(System.in);
        long n=Reader.nextInt();
        long k=Reader.nextInt();
        long dip=Math.floorDiv(n,((k+1)*2));
        long cer=k*dip;
        long no=n-dip-cer;
        System.out.println(dip+" "+cer+" "+no);
    }
}

class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                     new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                   reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static long nextInt() throws IOException {
        return Long.parseLong( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
}

import java.io.*;
import java.util.*;

public class A1008 {
    public static void main(String [] args) /*throws Exception*/ {
        InputStream inputReader = System.in;
        OutputStream outputReader = System.out;
        InputReader in = new InputReader(inputReader);//new InputReader(new FileInputStream(new File("input.txt")));new InputReader(inputReader);
        PrintWriter out = new PrintWriter(outputReader);//new PrintWriter(new FileOutputStream(new File("output.txt")));
        Algorithm solver = new Algorithm();
        solver.solve(in, out);
        out.close();
    }
}

class Algorithm {
    void solve(InputReader ir, PrintWriter pw) {

        long n = ir.nextLong(), k = ir.nextLong(), f = n / 2, half = f + n % 2, first, second;

        first = f / (k + 1);
        second = first * k;
        half = half + f - first - second;

        pw.print(first + " " + second + " " + half);

    }

    private static void Qsort(int[] array, int low, int high) {

        int i = low;
        int j = high;
        int x = array[low + (high - low) / 2];

        do {
            while (array[i] < x) ++i;
            while (array[j] > x) --j;
            if (i <= j) {
                int tmp = array[i];
                array[i] = array[j];
                array[j] = tmp;
                i++;
                j--;
            }
        } while (i <= j);

        if (low < j) Qsort(array, low, j);
        if (i < high) Qsort(array, i, high);

    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    String nextLine(){
        String fullLine = null;
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                fullLine = reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return fullLine;
        }
        return fullLine;
    }

    String [] toArray() {
        return nextLine().split(" ");
    }

    int nextInt() {
        return Integer.parseInt(next());
    }
    double nextDouble() {
        return Double.parseDouble(next());
    }
    long nextLong() {
        return Long.parseLong(next());
    }

}

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        long n=input.nextLong();
        long k=input.nextLong();

        long d= n/(2*(1+k));
        long c= d*k;
        long e= n-(c+d);
        System.out.println(d+" "+c+" "+e);
    }
}
// 1508276683085

import java.util.Scanner;

public class Winners {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		long n,k,d,c,w;
		Scanner in = new Scanner(System.in);
		n=in.nextLong();
		k=in.nextLong();
		d=Math.floorDiv(Math.floorDiv(n, 2), k+1);
		c=k*d;
		w=d+c;
		System.out.println(""+d+" "+c+" "+(n-w));
		in.close();
	}

}

import java.util.Scanner;

public class cp1 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc =new Scanner(System.in);
		long n= sc.nextLong();
		long k= sc.nextLong();
		long b=n/(2*(1+k));
		if(n>b*k && b!=0){
			System.out.print(b +" ");
			System.out.print(b*k+" ");
			System.out.print(n-b-(b*k));
		}
		else{
			System.out.print(b +" ");
			System.out.print(b*k+" ");
			System.out.print(n-b-(b*k));
		}
	}

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Harshal Khodifad
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong();
            long k = in.nextLong();

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

            out.print(x + " " + k * x + " " + y);
        }

    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class dipcerti
{

public static void main (String[] args)
{
Reader.init(System.in);
try
{
  long n=Reader.nextLong();
  long k=Reader.nextLong();

  long t=k+1;
  long limit= n/2;
  if (t>limit)
  {
	  System.out.println(0+" "+0+" "+n);
  }

  else
  {
	  long d=limit/t;
	  long c=k*d;
	  long no=n-(d+c);
	  System.out.println(d+" "+c+" "+no);
  }

}
 catch (IOException e)
	{
		e.printStackTrace();
	}
}
}

class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                     new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                   reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }
    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
}

import java.io.*;
import java.util.*;

/**
 * Road to 1800 raiting
 */
public class Main {
    static class Task {
        PrintWriter out;

        public void solve(MyScanner in, PrintWriter out) {
            long n = in.nextLong(), k = in.nextLong();
            //rk + k * rk <= 2 / n
            long rk = n / 2 / (k + 1);
            System.out.println(rk + " " + k * rk + " " + (n - rk * (k + 1)));
        }
    }

    public static void main(String[] args) {
        MyScanner in = new MyScanner();
        PrintWriter out = new PrintWriter(System.out);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}

import java.io.*;
import java.util.*;

/**
 * Road to 1800 raiting
 */
public class Main {
    static class Task {
        PrintWriter out;

        long n, k;

        public void solve(MyScanner in, PrintWriter out) {
            n = in.nextLong();
            k = in.nextLong();

            long rk = binsearch(0, n + 1);
            System.out.println(rk + " " + k * rk + " " + (n - rk * (k + 1)));
        }

        long binsearch(long l, long r) {
            if (l == r - 1) {
                return l;
            }
            long mid = l + (r - l) / 2;

            if (isInRange(mid)) {
                return binsearch(mid, r);
            } else {
                return binsearch(l, mid);
            }
        }

        boolean isInRange(long a) {
            try {
                return Math.addExact(Math.multiplyExact(a, k), a) <= n / 2;
            } catch (ArithmeticException e) {
                return false;
            }
        }
    }

    public static void main(String[] args) {
        MyScanner in = new MyScanner();
        PrintWriter out = new PrintWriter(System.out);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}

import java.util.*;
import java.io.*;
import java.io.FileWriter;
import java.math.BigInteger;
import java.math.BigDecimal;
// Solution

public class Main
{
  public static void main (String[] argv)
  {
	  new Main();
  }

  boolean test = false;
  final int[][] dirs8 = {{0,1}, {0,-1}, {-1,0}, {1,0}, {1,1},{1,-1},{-1,1},{-1,-1}};
  final int[][] dirs4 = {{0,1}, {0,-1}, {-1,0}, {1,0}};
  final int MOD = 1000000007;  //998244353;

  final int WALL = -1;
  final int EMPTY = -2;
  final int VISITED = 1;
  final int FULL = 2;

  final int START = 1;
  final int END = 0;

  long[] fac;
  long[] ifac;
  long[] rfac;

  int[] mobius;
  int[] sieve;
  int[][] factors;

  //long[] fac = new long[100];
  //long[] ifac = new long[100001];
  public Main()  {
	FastReader in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));

    //FastReader in = new FastReader(new BufferedReader(new FileReader("Main.in")));

    //int nt = in.nextInt();
    int nt = 1;
    StringBuilder sb = new StringBuilder();

    //fac[0] = 1;
    //ifac[0] = 1;
    //for (int i = 1; i <= 20; i++) {
      //  fac[i] = fac[i-1] * i % MOD;
      //  ifac[i] = ifac[i-1] * inv(i) % MOD;
    //}
    long[][] C = new long[19][11];

    // Caculate value of Binomial Coefficient
    // in bottom up manner
    for (int i = 0; i <= 18; i++)
    {
        for (int j = 0; j <= min(i, 10); j++)
        {
            // Base Cases
            if (j == 0 || j == i)
                C[i][j] = 1;

            // Calculate value using previously
            // stored values
            else
                C[i][j] = C[i - 1][j - 1] +
                          C[i - 1][j];
        }
    }

    //long[] invs = new long[101];
    //for (int i = 1; i <= 100; i++) invs[i] = inv(i);
    BigInteger ans = new BigInteger("0");

    for (int it = 0; it < nt; it++)
    {
       long n = in.nextLong();
       long k = in.nextLong();
       long x = n / (2 * (k+1));
       long y = k * x;
       long z = n - x - y;

       System.out.println(x + " " + y + " " + z);

    }

    System.out.println(sb);
  }

  private void add(Map<Integer, Integer> map, int key)
  {
      if (map.containsKey(key)) map.put(key, map.get(key) + 1);
      else map.put(key, 1);
  }

  private long[][] matIdentity(int n)
  {
      long[][] a = new long[n][n];
      for (int i = 0; i < n; i++)
          a[i][i] = 1;
      return a;
  }
  private long[][] matPow(long[][] mat0, long p)
  {
      int n = mat0.length;
      long[][] ans = matIdentity(n);
      long[][] mat = matCopy(mat0);
      while (p > 0)
      {
          if (p % 2 == 1){
              ans = matMul(ans, mat);
          }

          p /= 2;
          mat = matMul(mat, mat);
      }
      return ans;
  }

  private long[][] matCopy(long[][] a)
  {
      int n = a.length;
      long[][] b = new long[n][n];
      for (int i = 0; i < n; i++)
          for (int j = 0; j < n; j++)
              b[i][j] = a[i][j];
      return b;
  }
  private long[][] matMul(long[][] a, long[][] b)
  {
      int n = a.length;

      long[][] c = new long[n][n];
      for (int i = 0; i < n; i++)
      {
          for (int j = 0; j < n; j++)
          {
              for (int k = 0; k < n; k++)
                  c[i][j] = (c[i][j] + a[i][k] * b[k][j]) % MOD;
          }
      }

      return c;
  }

  private long[] matMul(long[][] a, long[] b)
  {
      int n = a.length;

      long[] c = new long[n];
      for (int i = 0; i < n; i++)
      {
          for (int j = 0; j < n; j++)
              c[i] = (c[i] + a[i][j] * b[j]) % MOD;
      }

      return c;
  }

  class Mark implements Comparable<Mark> {
      int type, h;
      long x;
      public Mark(int h, long x, int type)
      {
         this.h = h;
         this.x = x;
         this.type = type;
      }

      @Override
      public int compareTo(Mark o)
      {
          if (this.x == o.x) return type - o.type; // let end comes before start
          return Long.compare(x, o.x);
      }
  }

  private boolean coLinear(int[] p, int[] q, int[] r)
  {
      return 1L * (p[1] - r[1]) * (q[0] - r[0]) == 1L * (q[1] - r[1]) * (p[0] - r[0]);
  }

  private void fill(char[] a, int lo, int c, char letter)
  {
      //System.out.println("fill " + lo + " " + c + " " + letter);
      for (int i = lo; i < lo + c; i++) a[i] = letter;
  }

  private int cntBitOne(String s){
      int c = 0, n = s.length();
      for (int i = 0; i < n; i++)
          if (s.charAt(i) == '1') c++;
      return c;
  }

  class DSU {
      int n;
      int[] par;
      int[] sz;
      int nGroup;

      public DSU(int n)
      {
          this.n = n;
          par = new int[n];
          sz = new int[n];
          for (int i = 0;  i < n; i++){
              par[i] = i;
              sz[i] = 1;
          }
          nGroup = n;
      }

      private boolean add(int p, int q) {
          int rp = find(p);
          int rq = find(q);
          if (rq == rp) return false;

          if (sz[rp] <= sz[rq]) {
              sz[rq] += sz[rp];
              par[rp] = rq;
          }else {
              sz[rp] += sz[rq];
              par[rq] = rp;
          }
          nGroup--;
          return true;
      }

      private int find(int p)
      {
          int r = p;
          while (par[r] != r) r = par[r];

          while (r != p) {
              int t = par[p];
              par[p] = r;
              p = t;
          }
          return r;
      }

  }

  // μ(n) = 1 if n is a square-free positive integer with an even number of prime factors. e.g.  6, 15
  // μ(n) = −1 if n is a square-free positive integer with an odd number of prime factors. e.g.  2, 3, 5, 2*3*5
  // μ(n) = 0 if n has a squared prime factor. e.g : 2*2,  3*3*5
  private void build_mobius_function(int n)
  {
      mobius = new int[n+1];
      sieve = new int[n+1];
      factors = new int[n+1][];
      //for (int i = 1; i <= n; i++)factors[i] = new ArrayList<>();
      for (int i = 2; i <= n; i++)
        sieve[i] = i;
      for (int i = 2; i <= n; i++)
      {
        if (sieve[i] == i){
            mobius[i] = -1;
            for (long j = 1L * i * i; j <= n; j += i)
                sieve[(int)j] = i;
        }
      }

      for (int i = 6; i <= n; i++)
      {
          if (sieve[i] != i) {
              int pre = i / sieve[i];
              if (pre % sieve[i] != 0)
                  mobius[i] = -mobius[pre];
          }
      }
      int[] sz = new int[n+1];
      long tot = 0;
      for (int i = 2; i <= n; i++)
      {
          if (mobius[i] != 0)
          {
              for (int j = i * 2; j <= n; j += i) {
                  sz[j]++;
                  tot++;
              }
          }
      }
      for (int i = 2; i <= n; i++) {
          factors[i] = new int[sz[i]];
          sz[i] = 0;
      }

      for (int i = 2; i <= n; i++)
      {
          if (mobius[i] != 0)
          {
              for (int j = i * 2; j <= n; j += i) {
                  factors[j][sz[j]++] = i;
                  //factors[j].add(i);
              }
          }
      }
      //System.out.println("tot  =  "  + tot);
  }

  private int[] build_z_function(String s)
  {
      int n = s.length();
      int[] zfun = new int[n];

      int l = -1, r = -1;
      for (int i = 1; i < n; i++)
      {
         // Set the start value
         if (i <= r)
            zfun[i] = Math.min(zfun[i-l], r - i + 1);

         while (i + zfun[i] < n && s.charAt(i + zfun[i]) == s.charAt(zfun[i]))
             zfun[i]++;

         if (i + zfun[i] - 1> r){
             l = i;
             r = i + zfun[i] - 1;
         }
      }

      if (test)
      {
          System.out.println("Z-function of " + s);
          for (int i = 0; i < n; i++) System.out.print(zfun[i] + " ");
          System.out.println();
      }
      return zfun;
  }

  class BIT {
      int[] bit;
      int n;

      public BIT(int n){
          this.n = n;
          bit = new int[n+1];
      }

      private int query(int p)
      {
          int sum = 0;
          for (; p > 0; p -= (p & (-p)))
             sum += bit[p];

          return sum;
      }

      private void add(int p, int val)
      {
         //System.out.println("add to BIT " + p);
         for (; p <= n; p += (p & (-p)))
            bit[p] += val;
      }

  }

  private List<Integer> getMinFactor(int sum)
  {
      List<Integer>  factors = new ArrayList<>();

               for (int sz = 2; sz <= sum / sz; sz++){
                   if (sum % sz == 0) {
                       factors.add(sz);
                       factors.add(sum / sz);
                   }
               }
               if (factors.size() == 0)
                   factors.add(sum);

      return factors;
  }

  /* Tree class */
  class Tree {
      int V = 0;
      int root = 0;
      List<Integer>[] nbs;
      int[][] timeRange;
      int[] subTreeSize;
      int t;
      boolean dump = false;

      public Tree(int V, int root)
      {
          if (dump)
              System.out.println("build tree with size = " + V + ", root = " + root);

          this.V = V;
          this.root = root;
          nbs = new List[V];
          subTreeSize = new int[V];
          for (int i = 0; i < V; i++)
              nbs[i] = new ArrayList<>();

      }

      public void doneInput()
      {
          dfsEuler();
      }

      public void addEdge(int p, int q)
      {
          nbs[p].add(q);
          nbs[q].add(p);
      }

      private void dfsEuler()
      {
          timeRange = new int[V][2];
          t = 1;
          dfs(root);
      }

      private void dfs(int node)
      {
          if (dump)
              System.out.println("dfs on node " + node + ", at time " + t);
          timeRange[node][0] = t;

          for (int next : nbs[node]) {
              if (timeRange[next][0] == 0)
              {
                  ++t;
                  dfs(next);
              }
          }
          timeRange[node][1] = t;
          subTreeSize[node] = t - timeRange[node][0] + 1;
      }

      public List<Integer> getNeighbors(int p) {
          return nbs[p];
      }

      public int[] getSubTreeSize(){
          return subTreeSize;
      }

      public int[][] getTimeRange()
      {
          if (dump){
              for (int i = 0; i < V; i++){
                  System.out.println(i + ": " + timeRange[i][0] + " - " + timeRange[i][1]);
              }
          }
          return timeRange;
      }

  }

  /* segment tree */
  class SegTree {
      int[] a;
      int[] tree;
      int[] treeMin;
      int[] treeMax;
      int[] lazy;
      int n;
      boolean dump = false;

      public SegTree(int n)
      {
          if (dump)
              System.out.println("create segTree with size " + n);
          this.n = n;
          treeMin = new int[n*4];
          treeMax = new int[n*4];
          lazy = new int[n*4];
      }

      public SegTree(int n, int[] a) {
          this(n);
          this.a = a;
          buildTree(1, 0, n-1);
      }

      private void buildTree(int node, int lo, int hi)
      {
          if (lo == hi) {
              tree[node] = lo;
              return;
          }

          int m = (lo + hi) / 2;
          buildTree(node * 2, lo, m);
          buildTree(node * 2 + 1, m + 1, hi);
          pushUp(node, lo, hi);
      }

      private void pushUp(int node, int lo, int hi)
      {
          if (lo >= hi) return;

          // note that, if we need to call pushUp on a node, then lazy[node] must be zero.

          //the true value is the value + lazy
          treeMin[node] = Math.min(treeMin[node * 2] + lazy[node * 2], treeMin[node * 2 + 1] + lazy[node * 2 + 1]);
          treeMax[node] = Math.max(treeMax[node * 2] + lazy[node * 2], treeMax[node * 2 + 1] + lazy[node * 2 + 1]);
          // add combine fcn
      }

      private void pushDown(int node, int lo, int hi)
      {
          if (lazy[node] == 0) return;

          int lz = lazy[node];
          lazy[node] = 0;

          treeMin[node] += lz;
          treeMax[node] += lz;

          if (lo == hi) return;

          int mid = (lo + hi) / 2;
          lazy[node * 2] += lz;
          lazy[node * 2 + 1] += lz;
      }

      public int rangeQueryMax(int fr, int to)
      {
          return rangeQueryMax(1, 0, n-1, fr, to);
      }

      public int rangeQueryMax(int node, int lo, int hi, int fr, int to)
      {
          if (lo == fr && hi == to)
              return treeMax[node] + lazy[node];

          int mid = (lo + hi) / 2;
          pushDown(node, lo, hi);

          if (to <= mid) {
              return rangeQueryMax(node * 2, lo, mid, fr, to);
          }else if (fr > mid)
              return rangeQueryMax(node * 2 + 1, mid + 1, hi, fr, to);
          else {
              return Math.max(rangeQueryMax(node * 2, lo, mid, fr, mid),
                              rangeQueryMax(node * 2 + 1, mid + 1, hi, mid + 1, to));
          }
      }

      public int rangeQueryMin(int fr, int to)
      {
          return rangeQueryMin(1, 0, n-1, fr, to);
      }

      public int rangeQueryMin(int node, int lo, int hi, int fr, int to)
      {
          if (lo == fr && hi == to)
              return treeMin[node] + lazy[node];

          int mid = (lo + hi) / 2;
          pushDown(node, lo, hi);

          if (to <= mid) {
              return rangeQueryMin(node * 2, lo, mid, fr, to);
          }else if (fr > mid)
              return rangeQueryMin(node * 2 + 1, mid + 1, hi, fr, to);
          else {
              return Math.min(rangeQueryMin(node * 2, lo, mid, fr, mid),
                              rangeQueryMin(node * 2 + 1, mid + 1, hi, mid + 1, to));
          }
      }

       public void rangeUpdate(int fr, int to, int delta){
           rangeUpdate(1, 0, n-1, fr, to, delta);
       }

      public void rangeUpdate(int node, int lo, int hi, int fr, int to, int delta){
          pushDown(node, lo, hi);
          if (fr == lo && to == hi)
          {
              lazy[node] = delta;
              return;
          }

          int m = (lo + hi) / 2;
          if (to <= m)
              rangeUpdate(node * 2, lo, m, fr, to, delta);
          else if (fr > m)
              rangeUpdate(node * 2 + 1, m + 1, hi, fr, to, delta);
          else  {
              rangeUpdate(node *  2, lo, m, fr, m, delta);
              rangeUpdate(node * 2 + 1, m + 1, hi, m + 1, to, delta);
          }

          // re-set the in-variant
          pushUp(node, lo, hi);
      }

      public int query(int node, int lo, int hi, int fr, int to)
      {
          if (fr == lo && to == hi)
              return tree[node];

          int m = (lo + hi) / 2;
          if (to <= m)
              return  query(node * 2, lo, m, fr, to);
          else if (fr > m)
              return query(node * 2 + 1, m + 1, hi, fr, to);

          int lid = query(node * 2, lo, m, fr, m);
          int rid = query(node * 2 + 1, m + 1, hi, m + 1, to);
          return a[lid] >= a[rid] ? lid : rid;
      }

  }

  private long inv(long v)
  {
      return pow(v, MOD-2);
  }

  private long pow(long v, long p)
  {
      long ans = 1;
      while (p > 0)
      {
          if (p % 2 == 1)
              ans = ans * v % MOD;
          v = v * v % MOD;
          p = p / 2;
      }
      return ans;
  }

  private double dist(double x, double y, double xx, double yy)
  {
      return Math.sqrt((xx - x) * (xx - x) + (yy - y) * (yy - y));
  }

  private int mod_add(int a, int b) {
      int v = a + b;
      if (v >= MOD) v -= MOD;
      return v;
  }

  private long overlap(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) {
      if (x1 > x3) return overlap(x3, y3, x4, y4, x1, y1, x2, y2);

      if (x3 > x2 || y4 < y1 || y3 > y2) return 0L;

      //(x3, ?, x2, ?)
      int yL = Math.max(y1, y3);
      int yH = Math.min(y2, y4);
      int xH = Math.min(x2, x4);

      return f(x3, yL, xH, yH);
  }
  //return #black cells in rectangle
  private long f(int x1, int y1, int x2, int y2) {
      long dx = 1L + x2 - x1;
      long dy = 1L + y2 - y1;
      if (dx % 2 == 0 || dy % 2 == 0 || (x1 + y1) % 2 == 0)
          return 1L * dx * dy / 2;
      return 1L * dx * dy / 2 + 1;
  }

  private int distM(int x, int y, int xx, int yy) {
      return abs(x - xx) + abs(y - yy);
  }

  private boolean less(int x, int y, int xx, int yy) {
      return x < xx || y > yy;
  }

  private int mul(int x, int y) {
      return (int)(1L * x * y % MOD);
  }

  private int nBit1(int v) {
      int v0 = v;
      int c = 0;
      while (v != 0) {
          ++c;
          v = v & (v - 1);
      }
      return c;
  }

  private long abs(long v) {
      return v > 0 ? v : -v;
  }

  private int abs(int v) {
      return v > 0 ? v : -v;
  }

  private int common(int v) {
      int c = 0;
      while (v != 1) {
          v = (v >>> 1);
          ++c;
      }

      return c;
  }

  private void reverse(char[] a, int i, int j) {
      while (i < j) {
          swap(a, i++, j--);
      }
  }

  private void swap(char[] a, int i, int j) {
      char t = a[i];
      a[i] = a[j];
      a[j] = t;
  }

  private int gcd(int x, int y) {
      if (y == 0) return x;
      return gcd(y, x % y);
  }
  private long gcd(long x, long y) {
      if (y == 0) return x;
      return gcd(y, x % y);
  }
  private int max(int a, int b) {
      return a >  b ? a : b;
  }

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

  private int min(int a, int b) {
      return a >  b ? b : a;
  }

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

  static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader(BufferedReader in)
        {
            br = in;
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    String line = br.readLine();
                    if (line == null || line.length() == 0) return "";
                    st = new StringTokenizer(line);
                }
                catch (IOException  e)
                {
                    return "";
                    //e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                return null;
                //e.printStackTrace();
            }
            return str;
        }
    }
}

import java.util.*;

public class Solution {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long n = scan.nextLong();
        long k = scan.nextLong();
        long polN = n/2;
        long r = polN/(k+1);
        System.out.println((r) + " " + (k*r) + " " + (n - r - k*r));
    }
}

import java.io.PrintStream;
import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		PrintStream out = System.out;
		//
		long n = in.nextLong();
		long k = in.nextLong();
		//
		long a = n / (2 * (k + 1));

		out.print(a + " " + (k * a) + " " + (n - (k + 1) * a));

	}

}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Scanner;
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import jdk.nashorn.internal.codegen.CompilerConstants;

public class Solution{
    public static void
         main(String [] args)throws IOException{

         Scanner sc=new Scanner(System.in);
         BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
         String[]s=br.readLine().trim().split("\\s+");
            long n=Long.parseLong(s[0]);
            long k=Long.parseLong(s[1]);

            long x=n/(2*(k+1));

            long rest=n-x-k*x;
            System.out.println(x+" "+k*x+" "+rest);

         }

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author uweto
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long n = in.nextLong(), k = in.nextLong(), c = 0, d = n >> 1;
            d = d - (d % (k + 1));
            d /= (k + 1);
            c = k * d;
            out.println(d + " " + c + " " + (n - (c + d)));
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
}

import javax.print.DocFlavor;
import java.io.*;
import java.util.*;

public class Main {
    static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    static final int[][] STEPS = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
    final static long MOD = 1000 * 1000 * 1000 + 7;

    boolean checkIndex(int index, int size) {
        return (0 <= index && index < size);
    }

    int abs(int a) {
        return Math.abs(a);
    }

    void solve() throws IOException {
        long n = readLong(), k = readLong();
        k++;
        long l = 0;
        long ans = 0;
        long r = n / 2;
        long mid = n / k + 1;
        while (l <= r) {
            if (mid * k > 1D * n / 2) {
                r = mid - 1;
            } else {
                ans = mid;
                l = mid + 1;
            }
            mid = (l + r) / 2;
        }
        out.println(ans + " " + (long) (ans * (k - 1)) + " " + (long) (n - ans * k));

    }

    int minInt(int... values) {
        int min = Integer.MAX_VALUE;
        for (int value : values) {
            min = Math.min(min, value);
        }
        return min;
    }

    int maxInt(int... values) {
        int max = Integer.MIN_VALUE;
        for (int value : values) {
            max = Math.max(max, value);
        }
        return max;
    }

    long minLong(long... values) {
        long min = Long.MAX_VALUE;
        for (long value : values) {
            min = Math.min(min, value);
        }
        return min;
    }

    long maxLong(long... values) {
        long max = Long.MIN_VALUE;
        for (long value : values) {
            max = Math.max(max, value);
        }
        return max;
    }

    public static void main(String[] args) {
        new Main().run();
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
        tok = new
                StringTokenizer("");
    }

    void run() {
        try {
            long timeStart = System.currentTimeMillis();

            init();
            solve();

            out.close();

            long timeEnd = System.currentTimeMillis();
            System.err.println("time = " + (timeEnd - timeStart) + " compiled");
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }

    }

    String readLine() throws IOException {
        return in.readLine();
    }

    String delimiter = " ";

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            String nextLine = readLine();
            if (null == nextLine)
                return null;

            tok = new StringTokenizer(nextLine);
        }

        return tok.nextToken(delimiter);
    }

    int[] readIntArray(int b) {
        int a[] = new int[b];
        for (int i = 0; i < b; i++) {
            try {
                a[i] = readInt();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return a;
    }

    long[] readLongArray(int b) {
        long a[] = new long[b];
        for (int i = 0; i < b; i++) {
            try {
                a[i] = readLong();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return a;
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    void sortArrayInt(int[] a) {
        Integer arr[] = new Integer[a.length];
        for (int i = 0; i < a.length; i++) {
            arr[i] = a[i];
        }
        Arrays.sort(arr);
        for (int i = 0; i < a.length; i++) {
            a[i] = arr[i];
        }
    }

    void sortArrayLong(long[] a) {
        Long arr[] = new Long[a.length];
        for (int i = 0; i < a.length; i++) {
            arr[i] = a[i];
        }
        Arrays.sort(arr);
        for (int i = 0; i < a.length; i++) {
            a[i] = arr[i];
        }
    }

}

import java.util.*;

public class Works {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long n = in.nextLong();
        long k = in.nextLong();
        long dip = 0;
        long gram = 0;
        long nothing = 0;

        dip = n / (2 * (k + 1));
        gram = dip * k;
        nothing = n - gram - dip ;
        System.out.println(dip + " " + gram + " " + nothing);
    }
}

import java.util.*;

public class test
{
	/*
	private static class IntegerPair implements Comparable
	{
	    public Integer first;
	    public Integer second;

	    public IntegerPair(Integer f, Integer s) {
			first = f;
			second = s;
	    }

		public int compareTo(Object obj)
		{
			if (!this.first.equals( ((IntegerPair)obj).first) )
			{
			    return first - ((IntegerPair)obj).first;
			}
			else
			{
			    return second - ((IntegerPair)obj).second;
			}
		}
	}
	*/

	/*
	//Arrays.sort(data, new MyComparator());
	//if a<b return -1
	//if a>b return 1
	//if a==b return 0
	private static class MyComparator implements Comparator<Long>
	{
		@Override
		public int compare(Long a, Long b)
		{
			int a3 = 0;
			int b3 = 0;

			while(a%3==0)
			{
				a/=3;
				a3++;
			}
			while(b%3==0)
			{
				b/=3;
				b3++;
			}

			if(a3>b3)
			{
				return -1;
			}
			else if(a3 == b3 && a<b)
			{
				return -1;
			}
			return 1;

		}
	}
	*/

    private static Scanner sc = new Scanner(System.in);
	//private static String abc[] = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};

	public static void main(String[] args)
    {
		long n = sc.nextLong();
		long k = sc.nextLong();

		long good = (n/2)/(k+1);

		System.out.print(good + " " + (good*k) + " " + (n - good*(k+1)) );

	}

}

/*
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

9  15
10 19

11 39
12 67
13 69
14 68
15 74
*/

import java.util.*;
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb=new Scanner(System.in);
		while(kb.hasNext()){
			long n=kb.nextLong();
			long k=kb.nextLong();
			long a=n/(2*(1+k));
			long b=a*k;
			long c=n-a-b;
			System.out.println(a+" "+b+" "+c);
		}
	}

}

import java.lang.reflect.Array;
import java.util.*;

public class geek {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
  long n=s.nextLong();
  long k=s.nextLong();
  long x=(n/2)/(1+k);
  long y=k*x;
        System.out.println(x+" "+y+" "+(n-(x+y)));

        }
    }

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;

import java.util.StringTokenizer;

 public class Test
 {
     static PrintWriter pw = new PrintWriter(System.out);
     static ArrayList<Integer> list = new ArrayList();

    public static void main(String[] args)throws Exception
    {
        Reader.init(System.in);
        long n = Reader.nextLong();
        long k = Reader.nextLong();
        long a = (n/2) / (k + 1);

        StringBuilder str = new StringBuilder("");

        if(a == 0)
        {
            str.append("0 0 ").append(n);
            pw.print(str);
        }
        else
        {
            str.append(a).append(" ").append(a*k).append(" ").append(n - (a + a * k));
            pw.print(str);
        }

        pw.close();
    }

}

class Reader {

    static BufferedReader reader;
    static StringTokenizer tokenizer;

    public static int pars(String x) {
        int num = 0;
        int i = 0;
        if (x.charAt(0) == '-') {
            i = 1;
        }
        for (; i < x.length(); i++) {
            num = num * 10 + (x.charAt(i) - '0');
        }

        if (x.charAt(0) == '-') {
            return -num;
        }

        return num;
    }

    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input));
        tokenizer = new StringTokenizer("");
    }

    static void init(FileReader input) {
        reader = new BufferedReader(input);
        tokenizer = new StringTokenizer("");
    }

    static String next() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(
                    reader.readLine());
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return pars(next());
    }

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
}

import java.io.*;
import java.util.*;

/**
 * Created by Nayan on 7/11/2017.
 */
public class Main {
    public static void main(String[] args)throws IOException{
        //FScanner input = new FScanner(System.in);
        Scanner input = new Scanner(System.in);
        long n = input.nextLong();
        long k = input.nextLong();
        long D, C, loser;
        loser = n/2;
        D = loser/(1+k);
        C = D*k;
        loser = n - (C+D);
        System.out.println(D+" "+C+" "+loser);

    }

    static class FScanner {
        private StringTokenizer st;
        private BufferedReader br;
        FScanner(InputStream s){br=new BufferedReader(new InputStreamReader(s));}
        String next() throws IOException {
            while(st==null||!st.hasMoreTokens())st=new StringTokenizer(br.readLine());
            return st.nextToken();
        }
        int nextInt()throws IOException{return Integer.parseInt(next());}
        long nextLong()throws IOException{return Long.parseLong(next());}
        String nextLine()throws IOException{return br.readLine();}
        double nextDouble()throws IOException{return Double.parseDouble(next());}
        boolean ready()throws IOException{return br.ready();}
    }
}

import java.io.*;
import java.util.StringTokenizer;

/**
 * User: venkateshjn
 * Date: 2018-12-30
 */

public class A818 {

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(in, out);
        out.close();
    }

    static class TaskA {

        void solve(InputReader in, PrintWriter out) {
            long n = in.nextLong();
            long k = in.nextLong();
            long n2 = n / 2;
            long x = n2 / (k + 1);
            long res = n - (k + 1) * x;
            out.println(x + " " + k * x + " " + res);
        }
    }

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

    }
}

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        long n=sc.nextLong();
        long k=sc.nextLong();
        long d=(n/((k+1)*2));
        long e=d*k;
        long f=n-d-e;
        System.out.println(d+" "+e+" "+f);
    }
}

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner in=new Scanner(System.in);
        long n=in.nextLong();
        long k=in.nextLong();
        long temp=n/2;
        long a=(n/2)/(k+1),b=k*a;
        if(k<temp)
        {
            System.out.println(a+" "+b+" "+(n-(a+b)));
        }
        else{
            System.out.println(0+" "+0+" "+(n));
        }
    }
}

import java.util.*;
public final class Educational {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long k = sc.nextLong();

		long d = n/(2*(k+1));
		long c = k*d;
		long w= n-c-d;
		System.out.print(d+" "+c+" "+w);

	}

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Mayank
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong();
            long k = in.nextLong();
            if (k > n / 2) {
                out.print("0 0 " + n);
            } else {
                long x = n / (2 * (1 + k));
                long y = x * k;
                long max = x + y;
                out.print(x + " " + y + " " + (n - max));
            }
        }

    }
}

import java.io.*;
import java.util.*;
public class E24A
{
    static PrintWriter out=new PrintWriter((System.out));
    public static void main(String args[])throws IOException
    {
        Reader sc=new Reader();
        long n=sc.nextLong();
        long k=sc.nextLong();
        long d=1+k;
        d=2*d;
        long a=n/d;
        d=a;
        long c=d*k;
        long l=d+c;
        if(l<=n/2)
        {
            out.println(d+" "+c+" "+(n-l));
        }
        else
        {
            out.println("0 0 "+n);
        }
        out.close();
    }

    static class Reader
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        public String next()
        {
            while(!st.hasMoreTokens())
            {
                try
                {
                    st=new StringTokenizer(br.readLine());
                }
                catch(Exception e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt()
        {
            return Integer.parseInt(next());
        }

        public long nextLong()
        {
            return Long.parseLong(next());
        }

        public double nextDouble()
        {
            return Double.parseDouble(next());
        }

        public String nextLine()
        {
            try
            {
                return br.readLine();
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
            return null;
        }

        public boolean hasNext()
        {
            String next=null;
            try
            {
                next=br.readLine();
            }
            catch(Exception e)
            {
            }
            if(next==null)
            {
                return false;
            }
            st=new StringTokenizer(next);
            return true;
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        Reader.init(System.in);

        long n = Reader.nextLong();
        long k = Reader.nextLong();
        long c = n/(2*(1 + k));
        System.out.println(c + " " + k*c + " " + (n - (k*c + c)));
    }
}

class Reader{
    private static BufferedReader reader;
    private static StringTokenizer tokenizer;
    static void init(InputStream inputStream){
        reader = new BufferedReader(new InputStreamReader(inputStream));
        tokenizer = new StringTokenizer("");
    }
    private static String next() throws IOException {
        String read;
        while (!tokenizer.hasMoreTokens()){
            read = reader.readLine();
            if (read == null || read.equals(""))
                return "-1";
            tokenizer = new StringTokenizer(read);
        }

        return tokenizer.nextToken();
    }
    static int nextInt() throws IOException{
        return Integer.parseInt(next());
    }

    static long nextLong() throws IOException{
        return Long.parseLong(next());
    }

    //Get a whole line.
//    static String line() throws IOException{
//        return reader.readLine();
//    }
//
//    static double nextDouble() throws IOException{return Double.parseDouble(next());}
}

import java.util.*;

public class Main {

    public static void main(String[]args) {
    	Scanner sc= new Scanner(System.in);
   		long n=sc.nextLong();
    	long k=sc.nextLong();
    	long n1 =0;
    	if (n%2==0)
    		n1=n/2;
    		else n1=(n-1)/2;
    		long r1;
    	if (n1%(k+1)==0 )
    	r1 = n1/(k+1);
    			else{ n1 = n1 -(n1%(k+1));
    			r1 = n1/(k+1);

    	}long r2 = k*r1;

    	long rest= n-r1-r2+(n1%(k+1));
	System.out.println(r1+" "+r2+" "+rest);
    	}

}

import java.util.Scanner;
public class DipCer {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc=new Scanner(System.in);
		long n=sc.nextLong();
		long k=sc.nextLong();
		long h=1+k;
		long f=2*h;
		long j=n/f;
		long b=j*k;
		long d=b+j;
		long x=n-d;
		System.out.print(j + " ");
		System.out.print(b + " ");
		System.out.print(x);
		}
	}

import java.util.*;
import java.io.*;
import java.lang.*;
public class A818 {
	private static long mod = 1000000007;

	public static void main(String[] args) {
		InputReader in=new InputReader(System.in);
		PrintWriter pw=new PrintWriter(System.out);

		long n=in.nextLong();
		long k=in.nextLong();

		long c=n/(2*(k+1));
		long d=c*k;
		pw.println(c+" "+d+" "+(n-(c+d)));

		pw.flush();
		pw.close();
	}

	static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}
		public long[] nextLongArray(int n) {
			long a[] = new long[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextLong();
			}
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

	public static int[] suffle(int[] a,Random gen)
	{
		int n = a.length;
		for(int i=0;i<n;i++)
		{
			int ind = gen.nextInt(n-i)+i;
			int temp = a[ind];
			a[ind] = a[i];
			a[i] = temp;
		}
		return a;
	}

	public static void swap(int a, int b){
		int temp = a;
		a = b;
		b = temp;
	}

	public static ArrayList<Integer> primeFactorization(int n)
	{
		ArrayList<Integer> a =new ArrayList<Integer>();
		for(int i=2;i*i<=n;i++)
		{
			while(n%i==0)
			{
				a.add(i);
				n/=i;
			}
		}
		if(n!=1)
			a.add(n);
		return a;
	}

	public static void sieve(boolean[] isPrime,int n)
	{
		for(int i=1;i<n;i++)
			isPrime[i] = true;

		isPrime[0] = false;
		isPrime[1] = false;

		for(int i=2;i*i<n;i++)
		{
			if(isPrime[i] == true)
			{
				for(int j=(2*i);j<n;j+=i)
					isPrime[j] = false;
			}
		}
	}

	public static int GCD(int a,int b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static long GCD(long a,long b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static long LCM(long a,long b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int LCM(int a,int b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int binaryExponentiation(int x,int n)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static long binaryExponentiation(long x,long n)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static int modularExponentiation(int x,int n,int M)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static long modularExponentiation(long x,long n,long M)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static int modInverse(int A,int M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static long modInverse(long A,long M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static boolean isPrime(int n)
	{

	    if (n <= 1)  return false;
	    if (n <= 3)  return true;

	    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;
	}

	static class pair implements Comparable<pair>
	{
		Integer x, y;
		pair(int x,int y)
		{
			this.x=x;
			this.y=y;
		}

		public int compareTo(pair o) {
			int result = x.compareTo(o.x);
			if(result==0)
				result = y.compareTo(o.y);

			return result;
		}
	}
}

import java.util.Scanner;

public class P1_629 {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		long n = scanner.nextLong(), k = scanner.nextLong(), max = n/2;
		int i = 0;
		System.out.println(max/(k+1)+" "+max/(k+1)*k+" "+(n-max/(k+1)-max/(k+1)*k));
	}
}

import java.util.Scanner;

/**
 *
 * @author Amr
 */
public class NewClass {
    public static void main(String[] args) {

        Scanner sc =new Scanner(System.in);
         long  n =sc.nextLong(),k=sc.nextLong();
         long winners=n/2;
         long c=winners/(k+1);
         long d=(c*k);
         long loser=n-(c+d);
        System.out.println(c+" "+d+" "+loser);

    }

}

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long k = sc.nextLong();
		long d = n/(2L*(k+1L));
		long c = k*d;
		long nw = n - d - c;
		System.out.print(d + " " + c + " " + nw);
		System.out.println();
		sc.close();
	}
}

import java.util.*;
public class main
{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long k = sc.nextLong();
		long d = ((n/2)/(k+1));
		long c = k*d;
		System.out.print(d + " ");
		System.out.print(c + " ");
		System.out.println(n - (c+d));
	}
}

import java.util.Scanner;

public class Mag {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long n = scan.nextLong();
        long k = scan.nextLong();
        long p = (long)Math.floor(n / (2 * (k + 1)));
        long g = k * (long)Math.floor(n / (2 * (k + 1)));
        System.out.println(p + " " + g + " " + (n - p - g));
    }
}

import java.util.*;
import java.math.*;

public class Diplomas_and_Certificates_Takua {
   static Scanner in=new Scanner(System.in);
   public static void main(String[]args) {
	   BigInteger n=in.nextBigInteger();
	   BigInteger  k=in.nextBigInteger();

	   BigInteger  c , d;// c is the number students with certificates and d is number of students with diplomas.

	  // total number of winners is c+d=(k*d)+d=d(k+1)
	  // total number of winners must not be greater than half of the number of all students
	  // d(1+k) <= n/2
	  //d=(n/2)/(1+k)
	  d=(n.divide(BigInteger.valueOf(2))).divide(k.add(BigInteger.valueOf(1)));
	  //c=k*d
	  c=k.multiply(d);
	  //no_winners=n-c-d
	  BigInteger no_winners= n.subtract(c).subtract(d);

	   System.out.println(d+" "+c+" "+no_winners);

   }
}

//package codeforcesa1;
import java.util.*;
public class DiplomasAndCertificates {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        long n=in.nextLong();
        long k=in.nextLong();
        if(k+1>n/2)
        {
            System.out.println("0 "+"0 "+n);
        }else{
            long x=(n/2)/(k+1);
            System.out.println(x+" "+(x*k)+" "+(n-(x +(x*k))));
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;

/**
 *
 * @author User
 */
public class JavaApplication70 {

    /**
     * @param args the command line arguments
     */

      static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args) {
        // TODO code application logic here
          FastReader sc=new FastReader();
        long n=sc.nextLong();
        long k=sc.nextLong();
        long p=(n/2)/(k+1);
                            System.out.println(p+" "+p*k+" "+(n-(p*k+p)));

    }

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aman Kumar Singh
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ADiplomasAndCertificates solver = new ADiplomasAndCertificates();
        solver.solve(1, in, out);
        out.close();
    }

    static class ADiplomasAndCertificates {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            long n = nl();
            long k = nl();
            long winners = n / 2;
            long certis = (winners / (k + 1)) * k;
            long diplomas = winners / (k + 1);
            long not_winners = n - certis - diplomas;
            pn(diplomas + " " + certis + " " + not_winners);

        }

        long nl() {
            return in.nextLong();
        }

        void pn(String zx) {
            out.println(zx);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}

import java.util.*;
import java.math.*;

public class CP {
	public static void main(String[] args) {
		Scanner sc = new Scanner (System.in);
		BigInteger n = sc.nextBigInteger();
		BigInteger certificate = BigInteger.valueOf(0);
		BigInteger k = sc.nextBigInteger();
		BigInteger nothing = n.divide(BigInteger.valueOf(2));
		BigInteger remaining = n.subtract(nothing);
		BigInteger diploma = remaining.divide(k.add(BigInteger.valueOf(1)));
		if(diploma.equals(BigInteger.valueOf(0))) {
			certificate = BigInteger.valueOf(0);
			remaining = n;
		} else {
			certificate = diploma.multiply(k);
			remaining = n.subtract(certificate.add(diploma));
		}
		System.out.println(diploma + " " + certificate + " " + remaining);
	}
}

import java.util.*;
import java.math.*;

public class CP {
	public static void main(String[] args) {
		Scanner sc = new Scanner (System.in);
		BigInteger n = sc.nextBigInteger();
		BigInteger certificate = BigInteger.valueOf(0);
		BigInteger k = sc.nextBigInteger();
		BigInteger nothing = n.divide(BigInteger.valueOf(2));
		BigInteger remaining = n.subtract(nothing);
		BigInteger diploma = remaining.divide(k.add(BigInteger.valueOf(1)));
		if(diploma.equals(BigInteger.valueOf(0))) {
			certificate = BigInteger.valueOf(0);
			remaining = n;
		} else {
			certificate = remaining.subtract(diploma);
			remaining = n.subtract(certificate.add(diploma));
		}
		System.out.println(diploma + " " + certificate + " " + remaining);
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

/**
 * Educational Codeforces Round 24
 * Problem A
 * Diplomas and Certificates
 *
 * Created by mcparadip on 7/9/17.
 */

public class A {

    public static void main(String[] args) throws IOException {

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        StringTokenizer st = new StringTokenizer(in.readLine());

        int n = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());

        int half = n / 2;
        int diploma = half / (k+1);
        int certificate = half - diploma;
        int none = n - diploma - certificate;

        System.out.println(diploma + " " + certificate + " " + none);

    }

}

import java.util.*;
import java.lang.*;
import java.io.*;

public class ER24A  {

    public static void main (String[] args) throws java.lang.Exception {
        InputReader in = new InputReader(System.in);
        PrintWriter w = new PrintWriter(System.out);
        long n = in.nextLong(), k = in.nextLong();
        if (n % 2 == 1) {
            w.println(0 + " " + 0 + " " + n);
        } else {
            long rem = n / 2;

                long x = rem / (k + 1);
                w.println(x + " " + (rem - x) + " " + rem);

        }
        w.close();
    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new UnknownError();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int peek() {
            if (numChars == -1)
                return -1;
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    return -1;
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar];
        }

        public void skip(int x) {
            while (x-- > 0)
                read();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public String nextString() {
            return next();
        }

        public String next() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        public String nextLine() {
            StringBuffer buf = new StringBuffer();
            int c = read();
            while (c != '\n' && c != -1) {
                if (c != '\r')
                    buf.appendCodePoint(c);
                c = read();
            }
            return buf.toString();
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }
        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }
        public boolean hasNext() {
            int value;
            while (isSpaceChar(value = peek()) && value != -1)
                read();
            return value != -1;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}

import java.util.*;
import java.lang.*;
import java.io.*;

public class ER24A  {

    public static void main (String[] args) throws java.lang.Exception {
        InputReader in = new InputReader(System.in);
        PrintWriter w = new PrintWriter(System.out);
        long n = in.nextLong(), k = in.nextLong();

        long rem = n / 2;

        if (k + 1 > rem)
            w.println(0 + " " + 0 + " " + n);
        else {
            w.println(1 + " " + k + " " + (n - k - 1));
        }

        w.close();
    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new UnknownError();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int peek() {
            if (numChars == -1)
                return -1;
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    return -1;
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar];
        }

        public void skip(int x) {
            while (x-- > 0)
                read();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public String nextString() {
            return next();
        }

        public String next() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        public String nextLine() {
            StringBuffer buf = new StringBuffer();
            int c = read();
            while (c != '\n' && c != -1) {
                if (c != '\r')
                    buf.appendCodePoint(c);
                c = read();
            }
            return buf.toString();
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }
        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }
        public boolean hasNext() {
            int value;
            while (isSpaceChar(value = peek()) && value != -1)
                read();
            return value != -1;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}

import java.io.*;
import java.util.*;

public class A1008 {
    public static void main(String [] args) /*throws Exception*/ {
        InputStream inputReader = System.in;
        OutputStream outputReader = System.out;
        InputReader in = new InputReader(inputReader);//new InputReader(new FileInputStream(new File("input.txt")));new InputReader(inputReader);
        PrintWriter out = new PrintWriter(outputReader);//new PrintWriter(new FileOutputStream(new File("output.txt")));
        Algorithm solver = new Algorithm();
        solver.solve(in, out);
        out.close();
    }
}

class Algorithm {
    void solve(InputReader ir, PrintWriter pw) {

        long n = ir.nextLong(), k = ir.nextLong(), f = n / 2, half = f + n % 2, first, second;

        first = f * (k + 1);
        second = first * k;
        half = half + f - first - second;

        pw.print(first + " " + second + " " + half);

    }

    private static void Qsort(int[] array, int low, int high) {

        int i = low;
        int j = high;
        int x = array[low + (high - low) / 2];

        do {
            while (array[i] < x) ++i;
            while (array[j] > x) --j;
            if (i <= j) {
                int tmp = array[i];
                array[i] = array[j];
                array[j] = tmp;
                i++;
                j--;
            }
        } while (i <= j);

        if (low < j) Qsort(array, low, j);
        if (i < high) Qsort(array, i, high);

    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    String nextLine(){
        String fullLine = null;
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                fullLine = reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return fullLine;
        }
        return fullLine;
    }

    String [] toArray() {
        return nextLine().split(" ");
    }

    int nextInt() {
        return Integer.parseInt(next());
    }
    double nextDouble() {
        return Double.parseDouble(next());
    }
    long nextLong() {
        return Long.parseLong(next());
    }

}

import java.io.*;
import java.util.*;
public class TestCases
{
    public static void main(String args[]) throws IOException
    {
    	Scanner s=new Scanner(System.in);
    	long n=s.nextLong();
    	long k=s.nextLong();
    	long d;
    	if(k>=n/2) {
    		System.out.println("0 0 "+ n);
    		System.exit(0);
    	}
    	long min=n/2;
    	while(min>0) {
    	if(min%(k+1)==0) {
    		d=min/(k+1);
    		System.out.println(d+" "+(d*k)+" "+(n-(d*(1+k))));
    		System.exit(0);
    	}
    	System.out.println(min);
    	min--;
    	}
    	System.out.println("0 0 "+n);

    }
}

import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;

public class Q1 {

	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	static PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));

	public static void main(String[] args) throws Exception {
		String[] s = br.readLine().split(" ");
		long n = Long.parseLong(s[0]), k = Long.parseLong(s[1]);

		if(n <= k) {
			pw.println("0 0 " + n);
			pw.flush();
			pw.close();
			return;
		}

		boolean isOdd = false;
		if(n%2 == 1)
			isOdd = true;
		long num = n/2;
		if(isOdd)
			num++;

		while(true) {
			if(num%(k+1) == 0)
				break;
			else
				num--;
		}
		long small = num/(k+1);
		long big = small*k;
		pw.println(small + " " + big + " " + (n - num));
		pw.flush();
		pw.close();
	}
}

import java.io.*;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader bf=new BufferedReader(new InputStreamReader( System.in));
        PrintWriter pw=new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        StringTokenizer tk=new StringTokenizer(bf.readLine());
        Long n=Long.parseLong(tk.nextToken());
        Long k=Long.parseLong(tk.nextToken());
        Long x,y,z;
        if (k>=n/2){
            x= Long.valueOf(0);
            y= Long.valueOf(0);
            z= n;
        }
        else {
            x= n/(2+2*k);
            y= k*x;
            z= n/2;
        }
        pw.write(x+" "+y+" "+z);
        pw.flush(); }}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aeroui
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long n = in.nextLong();
            long k = in.nextLong();
            long l = n / 2 + (n % 2);

            l += l % (k + 1);
            l = Math.min(l, n);

            long a = Math.max(0, (n - l) / (k + 1));
            long b = a * k;

            l += Math.max(0, n - (a + b + l));

            out.println(a + " " + b + " " + l);
        }

    }
}

import java.util.*;
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb=new Scanner(System.in);
		while(kb.hasNext()){
			long n=kb.nextLong();
			long k=kb.nextLong();
			long a=n/2*(1+k);
			long b=a*k;
			long c=n-a-b;
			System.out.println(a+" "+b+" "+c);
		}
	}

}

import java.io.*;
import java.util.*;

public class Solution {

	public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		Task task = new Task();
		int t = 1;
		for (int i = 1; i <= t; i++) task.solve(i, in, out);
		out.close();
	}

	static class Task {

		public void solve(int testNumber, InputReader in, OutputWriter out) throws IOException {
			long n = in.nextLong(), k = in.nextLong();
			long lo = 0, hi = n / 2;
			while (lo < hi) {
				long mid = lo + (hi - lo - 1) / 2;
				if (mid == (n / 2 - mid) / k) { lo = mid; break; }
				else if (mid < (n / 2 - mid) / k) lo = mid + 1;
				else hi = mid - 1;
			}
			out.println(lo, lo * k, n - lo - lo * k, " ");
 		}
	}

	static class InputReader {
		private BufferedReader reader;
		private StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		private void tokenize() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
		}

		public String next() {
			tokenize();
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public float nextFloat() {
			return Float.parseFloat(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public int[] nextIntArray(int size, int a) {
			tokenize();
			int[] arr=new int[size];
			for(int i = a; i < size; i++) {
				tokenize();
				arr[i] = Integer.parseInt(tokenizer.nextToken());
			}
			return arr;
		}

		public long[] nextLongArray(int size, int a) {
			tokenize();
			long[] arr=new long[size];
			for(int i = a; i < size; i++) {
				tokenize();
				arr[i] = Long.parseLong(tokenizer.nextToken());
			}
			return arr;
		}

		public float[] nextFloatArray(int size, int a) {
			tokenize();
			float[] arr=new float[size];
			for(int i = a; i < size; i++) {
				tokenize();
				arr[i] = Float.parseFloat(tokenizer.nextToken());
			}
			return arr;
		}

		public double[] nextDoubleArray(int size, int a) {
			tokenize();
			double[] arr=new double[size];
			for(int i = a; i < size; i++) {
				tokenize();
				arr[i] = Double.parseDouble(tokenizer.nextToken());
			}
			return arr;
		}

		public String[] nextStringArray(int size, int a) throws IOException {
			String[] arr=new String[size];
			for(int i = a; i < size; i++)
				arr[i] = reader.readLine();
			return arr;
		}

		public char[] nextCharArray() throws IOException {
			return reader.readLine().toCharArray();
		}
	}

	static class OutputWriter {
		public PrintWriter pw;

		public OutputWriter(OutputStream stream) {
			pw = new PrintWriter(stream);
		}

		public void println(Object... obj) {
			if (obj.length == 0) pw.println();
			else {
				String delimiter = (String) obj[obj.length - 1];
				for (int i = 0 ; i < obj.length - 1; i++) pw.print(obj[i] + delimiter);
			}
		}

		public void close() {
			pw.close();
		}

		public void flush() {
			pw.flush();
		}

		public void printStringArray(String[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.println(arr[i]);
		}

		public void printBooleanArray(boolean[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printIntArray(int[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printLongArray(long[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printCharArray(char[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printFloatArray(float[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printDoubleArray(double[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printIntArrayList(ArrayList<Integer> arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr.get(i) + " ");
		}

		public void printLongArrayList(ArrayList<Long> arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr.get(i) + " ");
		}
	}
}

import java.io.*;
import java.util.*;

public class Solution {

	public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		Task task = new Task();
		int t = 1;
		for (int i = 1; i <= t; i++) task.solve(i, in, out);
		out.close();
	}

	static class Task {

		public void solve(int testNumber, InputReader in, OutputWriter out) throws IOException {
			long n = in.nextLong(), k = in.nextLong();
			long win = n / 2;
			if ((n & 1) == 1) win--;
			long lo = 0, hi = win;
			while (lo < hi) {
				long mid = lo + (hi - lo + 1) / 2;
				if (mid == (win - mid) / k) { lo = mid; break; }
				else if (mid < (win - mid) / k) lo = mid + 1;
				else hi = mid - 1;
			}
			out.println(lo, lo * k, n - lo - lo * k, " ");
 		}
	}

	static class InputReader {
		private BufferedReader reader;
		private StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		private void tokenize() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
		}

		public String next() {
			tokenize();
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public float nextFloat() {
			return Float.parseFloat(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public int[] nextIntArray(int size, int a) {
			tokenize();
			int[] arr=new int[size];
			for(int i = a; i < size; i++) {
				tokenize();
				arr[i] = Integer.parseInt(tokenizer.nextToken());
			}
			return arr;
		}

		public long[] nextLongArray(int size, int a) {
			tokenize();
			long[] arr=new long[size];
			for(int i = a; i < size; i++) {
				tokenize();
				arr[i] = Long.parseLong(tokenizer.nextToken());
			}
			return arr;
		}

		public float[] nextFloatArray(int size, int a) {
			tokenize();
			float[] arr=new float[size];
			for(int i = a; i < size; i++) {
				tokenize();
				arr[i] = Float.parseFloat(tokenizer.nextToken());
			}
			return arr;
		}

		public double[] nextDoubleArray(int size, int a) {
			tokenize();
			double[] arr=new double[size];
			for(int i = a; i < size; i++) {
				tokenize();
				arr[i] = Double.parseDouble(tokenizer.nextToken());
			}
			return arr;
		}

		public String[] nextStringArray(int size, int a) throws IOException {
			String[] arr=new String[size];
			for(int i = a; i < size; i++)
				arr[i] = reader.readLine();
			return arr;
		}

		public char[] nextCharArray() throws IOException {
			return reader.readLine().toCharArray();
		}
	}

	static class OutputWriter {
		public PrintWriter pw;

		public OutputWriter(OutputStream stream) {
			pw = new PrintWriter(stream);
		}

		public void println(Object... obj) {
			if (obj.length == 0) pw.println();
			else {
				String delimiter = (String) obj[obj.length - 1];
				for (int i = 0 ; i < obj.length - 1; i++) pw.print(obj[i] + delimiter);
			}
		}

		public void close() {
			pw.close();
		}

		public void flush() {
			pw.flush();
		}

		public void printStringArray(String[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.println(arr[i]);
		}

		public void printBooleanArray(boolean[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printIntArray(int[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printLongArray(long[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printCharArray(char[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printFloatArray(float[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printDoubleArray(double[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printIntArrayList(ArrayList<Integer> arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr.get(i) + " ");
		}

		public void printLongArrayList(ArrayList<Long> arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr.get(i) + " ");
		}
	}
}

import java.io.*;
import java.util.*;

public class Solution {

	public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		Task task = new Task();
		int t = 1;
		for (int i = 1; i <= t; i++) task.solve(i, in, out);
		out.close();
	}

	static class Task {

		public void solve(int testNumber, InputReader in, OutputWriter out) throws IOException {
			long n = in.nextLong(), k = in.nextLong();
			long win = n / 2;
			if ((n & 1) == 1) win--;
			long lo = 0, hi = win;
			while (lo < hi) {
				long mid = lo + (hi - lo - 1) / 2;
				if (mid == (win - mid) / k) { lo = mid; break; }
				else if (mid < (win - mid) / k) lo = mid + 1;
				else hi = mid - 1;
			}
			out.println(lo, lo * k, n - lo - lo * k, " ");
 		}
	}

	static class InputReader {
		private BufferedReader reader;
		private StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		private void tokenize() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
		}

		public String next() {
			tokenize();
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public float nextFloat() {
			return Float.parseFloat(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public int[] nextIntArray(int size, int a) {
			tokenize();
			int[] arr=new int[size];
			for(int i = a; i < size; i++) {
				tokenize();
				arr[i] = Integer.parseInt(tokenizer.nextToken());
			}
			return arr;
		}

		public long[] nextLongArray(int size, int a) {
			tokenize();
			long[] arr=new long[size];
			for(int i = a; i < size; i++) {
				tokenize();
				arr[i] = Long.parseLong(tokenizer.nextToken());
			}
			return arr;
		}

		public float[] nextFloatArray(int size, int a) {
			tokenize();
			float[] arr=new float[size];
			for(int i = a; i < size; i++) {
				tokenize();
				arr[i] = Float.parseFloat(tokenizer.nextToken());
			}
			return arr;
		}

		public double[] nextDoubleArray(int size, int a) {
			tokenize();
			double[] arr=new double[size];
			for(int i = a; i < size; i++) {
				tokenize();
				arr[i] = Double.parseDouble(tokenizer.nextToken());
			}
			return arr;
		}

		public String[] nextStringArray(int size, int a) throws IOException {
			String[] arr=new String[size];
			for(int i = a; i < size; i++)
				arr[i] = reader.readLine();
			return arr;
		}

		public char[] nextCharArray() throws IOException {
			return reader.readLine().toCharArray();
		}
	}

	static class OutputWriter {
		public PrintWriter pw;

		public OutputWriter(OutputStream stream) {
			pw = new PrintWriter(stream);
		}

		public void println(Object... obj) {
			if (obj.length == 0) pw.println();
			else {
				String delimiter = (String) obj[obj.length - 1];
				for (int i = 0 ; i < obj.length - 1; i++) pw.print(obj[i] + delimiter);
			}
		}

		public void close() {
			pw.close();
		}

		public void flush() {
			pw.flush();
		}

		public void printStringArray(String[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.println(arr[i]);
		}

		public void printBooleanArray(boolean[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printIntArray(int[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printLongArray(long[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printCharArray(char[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printFloatArray(float[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printDoubleArray(double[] arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr[i] + " ");
		}

		public void printIntArrayList(ArrayList<Integer> arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr.get(i) + " ");
		}

		public void printLongArrayList(ArrayList<Long> arr, int a, int b) {
			for(int i = a; i < b; i++)
				pw.print(arr.get(i) + " ");
		}
	}
}

import java.io.*;
import java.util.*;

/**
 * Created by Nayan on 7/11/2017.
 */
public class Main {
    public static void main(String[] args)throws IOException{
        Scanner input = new Scanner(System.in);
        //Scanner input = new Scanner(new FileInputStream("input.txt"));
        long n = input.nextLong();
        long k = input.nextLong();
        long D, C, loser;
        loser = (n+1)/2;
        D = loser/(1+k);
        C = D*k;
        loser = n - (C+D);
        System.out.println(D+" "+C+" "+loser);

    }

    static class Scanner {
        private StringTokenizer st;
        private BufferedReader br;
        Scanner(InputStream s){br=new BufferedReader(new InputStreamReader(s));}
        String next() throws IOException {
            while(st==null||!st.hasMoreTokens())st=new StringTokenizer(br.readLine());
            return st.nextToken();
        }
        int nextInt()throws IOException{return Integer.parseInt(next());}
        long nextLong()throws IOException{return Long.parseLong(next());}
        String nextLine()throws IOException{return br.readLine();}
        double nextDouble()throws IOException{return Double.parseDouble(next());}
        boolean ready()throws IOException{return br.ready();}
    }
}

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        long n=sc.nextLong();
        long k=sc.nextLong();
        long d=(n/((k+1)*2));
        long e=(d*(k+1));
        long f=n-d-e;
        System.out.println(d+" "+e+" "+f);
    }
}

import java.io.*;
import java.util.*;
public class E24A
{
    static PrintWriter out=new PrintWriter((System.out));
    public static void main(String args[])throws IOException
    {
        Reader sc=new Reader();
        long a=sc.nextLong();
        long b=sc.nextLong()+1l;
        long n=a/2l;
        long x=0,y=0;
        while(n>0)
        {
            double d=n/(double)b;
            if((long)d==d)
            {
                x=(long)d;
                y=(long)x*(b-1l);
                break;
            }
            n--;
        }
        if(x==0&&y==0)
        {
            n=a;
        }
        out.println(x+" "+y+" "+((long)a-n));
        out.close();
    }

    static class Reader
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        public String next()
        {
            while(!st.hasMoreTokens())
            {
                try
                {
                    st=new StringTokenizer(br.readLine());
                }
                catch(Exception e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt()
        {
            return Integer.parseInt(next());
        }

        public long nextLong()
        {
            return Long.parseLong(next());
        }

        public double nextDouble()
        {
            return Double.parseDouble(next());
        }

        public String nextLine()
        {
            try
            {
                return br.readLine();
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
            return null;
        }

        public boolean hasNext()
        {
            String next=null;
            try
            {
                next=br.readLine();
            }
            catch(Exception e)
            {
            }
            if(next==null)
            {
                return false;
            }
            st=new StringTokenizer(next);
            return true;
        }
    }
}

import java.io.*;
import java.util.*;
public class E24A
{
    static PrintWriter out=new PrintWriter((System.out));
    public static void main(String args[])throws IOException
    {
        Reader sc=new Reader();
        long n=sc.nextLong();
        long k=sc.nextLong();
        long d=1;
        long c=d*k;
        long l=c+d;
        if(l<=n/2)
        {
            out.println(d+" "+c+" "+(n-l));
        }
        else
        {
            out.println("0 0 "+n);
        }
        out.close();
    }

    static class Reader
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        public String next()
        {
            while(!st.hasMoreTokens())
            {
                try
                {
                    st=new StringTokenizer(br.readLine());
                }
                catch(Exception e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt()
        {
            return Integer.parseInt(next());
        }

        public long nextLong()
        {
            return Long.parseLong(next());
        }

        public double nextDouble()
        {
            return Double.parseDouble(next());
        }

        public String nextLine()
        {
            try
            {
                return br.readLine();
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
            return null;
        }

        public boolean hasNext()
        {
            String next=null;
            try
            {
                next=br.readLine();
            }
            catch(Exception e)
            {
            }
            if(next==null)
            {
                return false;
            }
            st=new StringTokenizer(next);
            return true;
        }
    }
}

import java.io.*;
import java.util.*;
public class E24A
{
    static PrintWriter out=new PrintWriter((System.out));
    public static void main(String args[])throws IOException
    {
        Reader sc=new Reader();
        long a=sc.nextLong();
        long b=sc.nextLong()+1l;
        long n=a/2l;
        long x=0,y=0;
        while(n>0)
        {
            double d=n/(double)b;
            if((long)d==d)
            {
                x=(long)d;
                y=x*(b-1);
                break;
            }
            n--;
        }
        out.println(x+" "+y+" "+n);
        out.close();
    }

    static class Reader
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        public String next()
        {
            while(!st.hasMoreTokens())
            {
                try
                {
                    st=new StringTokenizer(br.readLine());
                }
                catch(Exception e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt()
        {
            return Integer.parseInt(next());
        }

        public long nextLong()
        {
            return Long.parseLong(next());
        }

        public double nextDouble()
        {
            return Double.parseDouble(next());
        }

        public String nextLine()
        {
            try
            {
                return br.readLine();
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
            return null;
        }

        public boolean hasNext()
        {
            String next=null;
            try
            {
                next=br.readLine();
            }
            catch(Exception e)
            {
            }
            if(next==null)
            {
                return false;
            }
            st=new StringTokenizer(next);
            return true;
        }
    }
}

import java.io.*;
import java.util.*;
public class E24A
{
    static PrintWriter out=new PrintWriter((System.out));
    public static void main(String args[])throws IOException
    {
        Reader sc=new Reader();
        long a=sc.nextLong();
        long b=sc.nextLong()+1l;
        long n=a/2l;
        long x=0,y=0;
        while(n>0)
        {
            double d=n/(double)b;
            if((long)d==d)
            {
                x=(long)d;
                y=x*(b-1);
                break;
            }
            n--;
        }
        if(x==0&&y==0)
        {
            n=a;
        }
        out.println(x+" "+y+" "+n);
        out.close();
    }

    static class Reader
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        public String next()
        {
            while(!st.hasMoreTokens())
            {
                try
                {
                    st=new StringTokenizer(br.readLine());
                }
                catch(Exception e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt()
        {
            return Integer.parseInt(next());
        }

        public long nextLong()
        {
            return Long.parseLong(next());
        }

        public double nextDouble()
        {
            return Double.parseDouble(next());
        }

        public String nextLine()
        {
            try
            {
                return br.readLine();
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
            return null;
        }

        public boolean hasNext()
        {
            String next=null;
            try
            {
                next=br.readLine();
            }
            catch(Exception e)
            {
            }
            if(next==null)
            {
                return false;
            }
            st=new StringTokenizer(next);
            return true;
        }
    }
}

import java.io.*;
import java.util.*;
public class E24A
{
    static PrintWriter out=new PrintWriter((System.out));
    public static void main(String args[])throws IOException
    {
        Reader sc=new Reader();
        long a=sc.nextLong();
        long b=sc.nextLong();
        long c=1;
        long d=b;
        long l=a-(c+d);
        out.println(c+" "+d+" "+l);
        out.close();
    }

    static class Reader
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        public String next()
        {
            while(!st.hasMoreTokens())
            {
                try
                {
                    st=new StringTokenizer(br.readLine());
                }
                catch(Exception e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt()
        {
            return Integer.parseInt(next());
        }

        public long nextLong()
        {
            return Long.parseLong(next());
        }

        public double nextDouble()
        {
            return Double.parseDouble(next());
        }

        public String nextLine()
        {
            try
            {
                return br.readLine();
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
            return null;
        }

        public boolean hasNext()
        {
            String next=null;
            try
            {
                next=br.readLine();
            }
            catch(Exception e)
            {
            }
            if(next==null)
            {
                return false;
            }
            st=new StringTokenizer(next);
            return true;
        }
    }
}

import java.util.*;

public class Main {

    public static void main(String[]args) {
    	Scanner sc= new Scanner(System.in);
   		long n=sc.nextLong();
    	long k=sc.nextLong();
    	long n1 =0;
    	if (n%2==0)
    		n1=n/2;
    		else n1=(n-1)/2;
    	long r1 = n1/(k+1);
    	long r2 = n1-r1;if (r1 ==0)r2=r1;
    	long rest= n-r1-r2;
    	long h = r2%k;
    	if (h==0)r1=r1;
    	else {r2= r2-h;
    	rest = rest +h;
    	}
    	System.out.println(r1+" "+r2+" "+rest);

}}

import java.io.FileReader;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        long total = scanner.nextLong();
        long k = scanner.nextLong();

        long diplomas = total / (4 * k);
        long gramotas = diplomas * k;
        long s_nosom = total - (diplomas + gramotas);

        System.out.println(diplomas + " " + gramotas + " " + s_nosom);
    }

}

import java.util.Scanner;

public class P818A {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong(), k = in.nextLong();
		System.out.print(((n / 2) / (k + 1)) + " " + ((n / 2) / (k * (k + 1))) + " "
				+ (n - ((n / 2) / (k + 1)) - ((n / 2) / (k * (k + 1)))));
		in.close();
	}
}

import java.util.Scanner;

public class P818A {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		long n = in.nextLong(), k = in.nextLong();
		long a = n / (k<<1 + 2);
		System.out.print(a + " " + k * a + " " + (n - (k + 1) * a));
		in.close();
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author captainTurtle
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            double k = in.nextDouble();
            double n = in.nextDouble();
            double g = 0, w = 0, s = 0;

            if ((k / 2) > n) {
                for (int i = 0; i < 3; i++) {
                    if ((k / 2) % 3 == 0) {
                        g = k / 6;
                        w = k / 3;
                        s = k - (g + w);
                        System.out.print(g);
                        System.out.print(" ");
                        System.out.print(w);
                        System.out.print(" ");
                        System.out.print(s);
                    } else {
                        continue;
                    }
                    k--;
                }
            } else {
                g = 0;
                w = 0;
                System.out.print(g);
                System.out.print(" ");
                System.out.print(w);
                System.out.print(" ");
                System.out.print(k - (g + w));
            }
        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author captainTurtle
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long k = in.nextLong();
            long n = in.nextLong();
            long g = 0, w = 0, s = 0, sabit = k;
            if ((k / 2) > n) {
                for (int i = 0; i < n + 2; i++) {
                    if ((k / 2) % (n + 1) == 0) {
                        g = (sabit / 2) / (n + 1);
                        w = g * n;
                        s = sabit - (g + w);
                        System.out.println(g);
                        System.out.println(w);
                        System.out.println(s);
                        break;
                    } else {
                        k = k - 1;
                    }

                }
            } else {
                g = 0;
                w = 0;
                System.out.println(g);
                System.out.println(w);
                System.out.println(k - (g + w));
            }
        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author captainTurtle
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long k = in.nextLong();
            long n = in.nextLong();
            long g = 0, w = 0, s = 0, sabit = k;

            if ((k / 2) > n) {
                for (int i = 0; i < n; i++) {
                    if ((k / 2) % (n + 1) == 0) {
                        g = (sabit / 2) / (n + 1);
                        w = g * n;
                        s = sabit - (g + w);
                        System.out.println(g);
                        System.out.println(w);
                        System.out.println(s);
                        break;
                    } else {
                        k = k - 1;
                    }

                }
            } else {
                g = 0;
                w = 0;
                System.out.println(g);
                System.out.println(w);
                System.out.println(k - (g + w));
            }
        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author captainTurtle
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            long k = in.nextLong();
            long n = in.nextLong();
            long g = 0, w = 0, s = 0;

            if ((k / 2) > n) {
                for (int i = 0; i < 3; i++) {
                    if ((k / 2) % 3 == 0) {
                        g = k / 6;
                        w = k / 3;
                        s = k - (g + w);
                        System.out.print(g);
                        System.out.print(" ");
                        System.out.print(w);
                        System.out.print(" ");
                        System.out.print(s);
                    } else {
                        continue;
                    }
                    k--;
                }
            } else {
                g = 0;
                w = 0;
                System.out.print(g);
                System.out.print(" ");
                System.out.print(w);
                System.out.print(" ");
                System.out.print(k - (g + w));
            }
        }

    }
}

import java.util.Scanner ;
public class A818_DiplomasAndCertificates {

	public static void main(String[] args) {
		Scanner ss = new Scanner (System.in)  ;
		long n =(long) ss.nextLong() ;
		long k =(long) ss.nextLong() ;
		int i = 2 ;
		if (n== 1 )
			System.out.println(0+" "+0+" "+1);
		else {
		for (; i<=n; i++){
			if(n%i==0&&((n/i)%(k) == 0 || (n/i)%(k+1) == 0)){
				break ;
			}
		}
		long dip = (long)(n/i)/(k+1) ;
		long cer = (long)(dip*k)  ;
		long no =(long) (n-dip-cer) ;
		System.out.println(dip+" "+ cer +" "+no);
	}
	}
}

import java.util.Scanner ;
public class A818_DiplomasAndCertificates {

	public static void main(String[] args) {
		Scanner ss = new Scanner (System.in)  ;
		long n =(long) ss.nextLong() ;
		long k =(long) ss.nextLong() ;
		int i = 2 ;
		if (n== 1 )
			System.out.println(0+" "+0+" "+1);
		else {
		for (;n%i!=0 ; i++){

		}
		long dip = (long)(n/i)/(k+1) ;
		long cer = (long)(dip*k)  ;
		long no =(long) (n-dip-cer) ;
		System.out.println(dip+" "+ cer +" "+no);
	}
	}
}

import java.util.Scanner;

public class Diplomas
{

    public static void main(String[] args)
    {

        Scanner input = new Scanner (System.in);

        System.out.print("");
        long n = input.nextLong();
        long k = input.nextLong();

        long dip = 0;
        long cer = 0;
        long los = n;
        long z = n/2;

        while(n >= 0 & z != 0)
        {
            if (z%(k+1) == 0)
                {
                    dip = z/(k+1);
                    cer = z/(k+1)*k;
                    los = n-z+2;
                    break;
                }
            n--;
            z--;
        }

        System.out.println(dip+ " " +cer+ " " +los);
    }

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author saadnoor
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long x, k;
            x = in.nextLong();
            k = in.nextLong();
            long Looser = x / 2;
            long diploma, certificate;
        /*certificate=(x-Looser)/k;*/
            diploma = (x - Looser) / (k + 1);
            certificate = diploma * k;
            long extra = (x - (certificate + diploma));
            extra -= Looser;
            Looser += extra;
            out.println(diploma + " " + certificate + " " + Looser);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
import java.io.*;

public class Main {

    public void solve() throws IOException {
        long n = nextLong();
        long k = nextLong();
        long t = (n / 2) / (k + 1);
        out.print(t + " " + (t * k) + " "  + (t * (k + 1)));
    }

    BufferedReader br;
    StringTokenizer sc;
    PrintWriter out;

    public String nextToken() throws IOException {
        while (sc == null || !sc.hasMoreTokens()) {
            try {
                sc = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return sc.nextToken();
    }

    public Integer nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    public Long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    public Double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    public static void main(String[] args) throws IOException {
        try {
            Locale.setDefault(Locale.US);
        } catch (Exception e) {
        }
        new Main().run();
    }

    public void run() {
        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
//            br = new BufferedReader(new FileReader("lesson.in"));
//            out = new PrintWriter(new File("lesson.out"));
            solve();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
}

import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.Map.Entry;
import java.util.function.Function;
import java.util.function.Supplier;

public class tests {
	static Scanner in = new Scanner();
	static PrintWriter out = new PrintWriter(System.out);
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public static void main(String[] test) throws NumberFormatException, IOException {
		long n = in.nextLong();
		long k = in.nextLong();

		long low = 0;
		long hi = (long) (1e12);
		// lower
		while (low < hi) {
			long mid = low + (hi - low) / 2;
			if (mid + mid * k < n / 2) {
				low = mid + 1;
			} else if (mid + mid * k > n / 2) {
				hi = mid - 1;
			} else {
				hi = mid;
			}
		}

		out.println(low + " " + (low * k) + " " + (n - (low + low * k)));

		out.flush();
		out.close();
	}

	static class Scanner {
		BufferedReader br;
		StringTokenizer st;

		Scanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		Scanner(String file) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(file));
		}

		String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}

		String nextLine() throws IOException {
			return br.readLine();
		}

		long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}

	}

}

import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.Map.Entry;
import java.util.function.Function;
import java.util.function.Supplier;

public class tests {
	static Scanner in = new Scanner();
	static PrintWriter out = new PrintWriter(System.out);
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	public static void main(String[] test) throws NumberFormatException, IOException {
		long n = in.nextLong();
		long k = in.nextLong();

		long low = 1L;
		long hi = (long) (1e12);
		long target = 0L;
		// lower
		while (low < hi) {
			long mid = (low + hi) / 2L;
			BigInteger b1 = BigInteger.valueOf(mid), b2 = BigInteger.valueOf(n / 2);

			BigInteger b3 = b1.multiply(BigInteger.valueOf(k));

			b1 = b1.add(b3);
			if (b1.compareTo(b2) <= 0) {
				low = mid + 1;
				target = mid;
			} else {
				hi = mid - 1;
			}
		}

		out.println((target) + " " + (target * k) + " " + (n - (target + target * k)));

		out.flush();
		out.close();
	}

	static class Scanner {
		BufferedReader br;
		StringTokenizer st;

		Scanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		Scanner(String file) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(file));
		}

		String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}

		String nextLine() throws IOException {
			return br.readLine();
		}

		long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}

	}

}

import java.math.BigInteger;
import java.util.Scanner;

public class winners {
public static void main(String args[]){
	Scanner s=new Scanner(System.in);
	BigInteger n=s.nextBigInteger();
	BigInteger k=s.nextBigInteger();
	BigInteger i=new BigInteger("2");
	BigInteger j=new BigInteger("0");
	BigInteger f=new BigInteger("1");
	j=k.add(f);
	BigInteger c;
	BigInteger d;
	d=n.divide(i);
	d=d.divide(j);
	c=d.multiply(k);
	System.out.println(d+" "+c+" "+n.divide(i));
}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 *
 * @author Sahil Gupta
 */
public class dip {
    public static void main(String[] args) throws IOException{
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] x = reader.readLine().split(" ");
        long n = Long.parseLong(x[0]);
        long k = Long.parseLong(x[1]);
        long  p = n/2;
        long dip=0;
        long cer=0;
        long win=p;
        dip = p/(k+1);
        cer = dip*(k);
        win = win + p - dip - cer;
        System.out.println(dip+" "+ cer+" "+ win);
    }
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {
    static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    static final int[][] STEPS = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};

    boolean checkIndex(int index, int size) {
        return (0 <= index && index < size);
    }

    void solve() throws IOException {
        long n = readLong();
        long k = readLong();
        long ans1 = 0;
        long ans2 = 0;
        long ans3 = 0;

        long l = 0;
        long r = n;
        long mid = 0;
        while (l <= r) {
            mid = (l + r) / 2;
            if (mid * (k + 1) < 0 || mid * (k + 1) > n / 2) {
                r = mid - 1;
            } else {
                l = mid + 1;
                ans1 = mid;
            }
        }
        out.println(ans1 + " " + ans1 * k + " " + (n - ans1 * (k + 1)));

    }

    int minInt(int... values) {
        int min = Integer.MAX_VALUE;
        for (int value : values) {
            min = Math.min(min, value);
        }
        return min;
    }

    int maxInt(int... values) {
        int max = Integer.MIN_VALUE;
        for (int value : values) {
            max = Math.max(max, value);
        }
        return max;
    }

    long minLong(long... values) {
        long min = Long.MAX_VALUE;
        for (long value : values) {
            min = Math.min(min, value);
        }
        return min;
    }

    long maxLong(long... values) {
        long max = Long.MIN_VALUE;
        for (long value : values) {
            max = Math.max(max, value);
        }
        return max;
    }

    public static void main(String[] args) {
        new Main().run();
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
        tok = new
                StringTokenizer("");
    }

    void run() {
        try {
            long timeStart = System.currentTimeMillis();

            init();
            solve();

            out.close();

            long timeEnd = System.currentTimeMillis();
            System.err.println("time = " + (timeEnd - timeStart) + " compiled");
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }

    }

    String readLine() throws IOException {
        return in.readLine();
    }

    String delimiter = " ";

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            String nextLine = readLine();
            if (null == nextLine)
                return null;

            tok = new StringTokenizer(nextLine);
        }

        return tok.nextToken(delimiter);
    }

    int[] readIntArray(int b) {
        int a[] = new int[b];
        for (int i = 0; i < b; i++) {
            try {
                a[i] = readInt();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return a;
    }

    long[] readLongArray(int b) {
        long a[] = new long[b];
        for (int i = 0; i < b; i++) {
            try {
                a[i] = readLong();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return a;
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    void sortArrayInt(int[] a) {
        Integer arr[] = new Integer[a.length];
        for (int i = 0; i < a.length; i++) {
            arr[i] = a[i];
        }
        Arrays.sort(arr);
        for (int i = 0; i < a.length; i++) {
            a[i] = arr[i];
        }
    }

    void sortArrayLong(long[] a) {
        Long arr[] = new Long[a.length];
        for (int i = 0; i < a.length; i++) {
            arr[i] = a[i];
        }
        Arrays.sort(arr);
        for (int i = 0; i < a.length; i++) {
            a[i] = arr[i];
        }
    }

}

import java.io.*;
import java.util.*;

public class cf114{
	public static void main(String[] args) throws IOException {
       Scanner sc = new Scanner(System.in);
       long n = sc.nextLong();
       long k = sc.nextLong();

       long nd = (n/2)/(k+1);
       long nc = k*(nd);
       long sum=0;
       if((nc+nd)>n/2){
          sum += Math.abs((nc+nd)-(n/2));
       }
       if(nc!=0 && nd!=0){
          sum += n-(nc+nd);
       }
       System.out.println(nd+" "+nc+" "+sum);
	}
}

//package vaday;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Codeforces {

	public static void main(String[] args)throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		String[] A = line.split(" ");
		long n = Long.parseLong(A[0]);
		long k = Long.parseLong(A[1]);
		if(1+k<=n/2){
			long diplomas = n/2*(1+k);
			long certificates = k*diplomas;
			long loosers = n-(diplomas+certificates);
			System.out.println(diplomas +" " + certificates + " " + loosers);
		}
		else{
			System.out.println(0 +" " + 0 + " " + n);
		}

	}

}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Scanner;
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import jdk.nashorn.internal.codegen.CompilerConstants;

public class Solution{
    public static void
         main(String [] args)throws IOException{

         Scanner sc=new Scanner(System.in);
         BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
         String[]s=br.readLine().trim().split("\\s+");
            long n=Long.parseLong(s[0]);
            long k=Long.parseLong(s[1]);

            long x=n/(k+1);
            while(x+k*x>n){
                x--;

            }
            long rest=n-x-k*x;
            System.out.println(x+" "+k*x+" "+rest);

         }

}

import java.util.*;
public class BalanceScale {
	public static void main(String[] args){
	Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int k = in.nextInt();
		int a,b,c;
		a=n/2%(k+1);
		b=a*k;
		c=n-a-b;
		System.out.println(a+" "+b+" "+c);
	}
}