#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, d;
  int n;
  scanf("%lf%lf", &a, &d);
  scanf("%d", &n);
  while (d > 4 * a) d -= 4 * a;
  bool left, right, up, down;
  left = true;
  right = up = down = false;
  double x = 0.0, y = 0.0;
  double rem = d;
  while (n) {
    if (left) {
      if (rem > (a - x)) {
        rem -= a - x;
        x = a;
        left = false;
        down = true;
      } else {
        x += rem;
        printf("%lf %lf\n", x, y);
        n--;
        rem = d;
      }
    }
    if (down) {
      if (rem > a - y) {
        rem -= a - y;
        y = a;
        down = false;
        right = true;
      } else {
        y += rem;
        printf("%lf %lf\n", x, y);
        n--;
        rem = d;
      }
    }
    if (right) {
      if (rem > x) {
        rem -= x;
        x = 0.0;
        right = false;
        up = true;
      } else {
        x -= rem;
        printf("%lf %lf\n", x, y);
        rem = d;
        n--;
      }
    }
    if (up) {
      if (rem > y) {
        rem -= y;
        y = 0.0;
        up = false;
        left = true;
      } else {
        y -= rem;
        printf("%lf %lf\n", x, y);
        rem = d;
        n--;
      }
    }
  }
  return 0;
}
