#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, d;
  int n;
  cin >> a >> d >> n;
  for (long long i = 1; i <= n; ++i) {
    long long now = i * d / a;
    long long type = now % 4;
    double tt = d * i - a * now;
    if (type == 0)
      printf("%lf %lf\n", tt, 0.0);
    else if (type == 1)
      printf("%lf %lf\n", a, tt);
    else if (type == 2)
      printf("%lf %lf\n", a - tt, a);
    else
      printf("%lf %lf\n", 0.0, a - tt);
  }
  return 0;
}
