#include <bits/stdc++.h>
using namespace std;
double a, d;
int N;
double cx, cy;
int main() {
  scanf("%lf%lf", &a, &d);
  scanf("%d", &N);
  for (int i = 0; i < N; ++i) {
    double dist = (i + 1) * d;
    long long p = floor(dist / a);
    double r = dist - a * p;
    switch (p % 4) {
      case 0:
        cx = r;
        cy = 0.0;
        break;
      case 1:
        cx = a;
        cy = r;
        break;
      case 2:
        cx = a - r;
        cy = a;
        break;
      case 3:
        cx = 0.0;
        cy = a - r;
        break;
    }
    printf("%0.10lf %0.10lf\n", cx, cy);
  }
  return 0;
}
