#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  double a, d;
  scanf("%lf %lf %I64d", &a, &d, &n);
  for (long long i = 1; i <= n; i++) {
    double c = i * d;
    long long m = c / a;
    double len = c - m * a;
    if (m % 4 == 0)
      printf("%.10f 0.0000000000\n", len);
    else if (m % 4 == 1)
      printf("%.10f %.10f\n", a, len);
    else if (m % 4 == 2)
      printf("%.10f %.10f\n", a - len, a);
    else if (m % 4 == 3)
      printf("0.0000000000 %.10f\n", a - len);
  }
  return 0;
}
