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