import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
int n, k, q, m;
double N;
Scanner in
= new Scanner
(System.
in);
n = in.nextInt();
k = in.nextInt();
m = n/k;
q = n%k;
N
= Math.
pow((m
+1),k
-q
) * Math.
pow((m
+2),q
);
System.
out.
println(q
+ " " + m
+ " " + N
); }
public static long pow(long x, int n) {
return (n == 0) ? 1 :
(n % 2 == 0) ? pow(x*x, n/2) :
pow(x, n-1)*x;
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJaW50IG4sIGssIHEsIG07CgkJZG91YmxlIE47CgkJU2Nhbm5lciBpbiA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CiAgICAgICAgICAgIAoJCW4gPSBpbi5uZXh0SW50KCk7CgkJayA9IGluLm5leHRJbnQoKTsKICAgICAgICAKCQltID0gbi9rOwoJCXEgPSBuJWs7CgkJTiA9IE1hdGgucG93KChtKzEpLGstcSkgKiBNYXRoLnBvdygobSsyKSxxKTsKICAgIAkKCQlTeXN0ZW0ub3V0LnByaW50bG4ocSArICIgIiArIG0gKyAiICIgKyBOKTsKCX0KCXB1YmxpYyBzdGF0aWMgbG9uZyBwb3cobG9uZyB4LCBpbnQgbikgewoJCXJldHVybiAobiA9PSAwKSA/IDEgOgoJCShuICUgMiA9PSAwKSA/IHBvdyh4KngsIG4vMikgOgoJCXBvdyh4LCBuLTEpKng7Cgl9Cn0=