#include <bits/stdc++.h>
using namespace std;
int main(void) {
  double a, d;
  scanf("%lf %lf", &a, &d);
  int n;
  scanf("%d", &n);
  double kell = a * 4;
  double pos = 0;
  for (int i = 0; i < n; i++) {
    pos = d * (i + 1);
    double posisi = fmod(pos, kell);
    double tambahan = fmod(posisi, a);
    if (posisi < a) {
      printf("%.4lf %.4lf\n", tambahan, 0.00000);
    } else if (posisi < 2 * a) {
      printf("%lf %.4lf\n", a, tambahan);
    } else if (posisi < 3 * a) {
      printf("%.4lf %lf\n", a - tambahan, a);
    } else {
      printf("%lf %.4lf\n", 0.000000, a - tambahan);
    }
  }
  return 0;
}
