#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) { return a > b; }
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
double a, d;
int n;
int main() {
  cin >> a >> d;
  cin >> n;
  double val = 0.0;
  for (long long i = 1; i <= n; i++) {
    long long times = (i * (double)d) / (double)(4 * (double)a);
    double v = (i * (double)d) - times * (4 * a);
    if (v >= 0 && v <= a) {
      printf("%0.10lf %0.10lf\n", v, 0.0);
    } else if (v >= a && v <= 2 * a) {
      printf("%0.10lf %0.10lf\n", a, v - a);
    } else if (v >= 2 * a && v <= 3 * a) {
      printf("%0.10lf %0.10lf\n", a - (v - (2 * a)), a);
    } else {
      printf("%0.10lf %0.10lf\n", 0.0, a - (v - (3 * a)));
    }
  }
  return 0;
}
