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