#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, d;
  scanf("%lf %lf", &a, &d);
  long long int n, i;
  scanf("%lld", &n);
  double dist;
  long long int temp1;
  double temp2;
  double x, y;
  for (i = 1; i <= n; ++i) {
    dist = i * d;
    temp1 = (long long int)(dist / a);
    temp1 %= 4;
    temp2 = fmod(dist, (double)a);
    if (temp1 == 0) {
      x = temp2;
      y = 0;
    } else if (temp1 == 1) {
      x = a;
      y = temp2;
    } else if (temp1 == 2) {
      x = a - temp2;
      y = a;
    } else {
      x = 0;
      y = a - temp2;
    }
    printf("%.5lf %.5lf\n", x, y);
  }
  return 0;
}
