#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, k, q, w, e, r;
double a, b;
cin >> n >> k;
for (int i = 1; i >= n; i++)
{
if (i % k == 0)
{
cout << i << endl;
q += i;
cout << q << endl;
e++;
cout << e << endl;
}
else
{
w += i;
cout << w << endl;
r++;
cout << r << endl;
}
}
a = q / e;
cout << a << endl;
b = w / r;
cout << b << endl;
printf("%.1lf %.1lf",a,b);
return 0;
}