#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long double a, d;
  int n;
  scanf("%Lf%Lf%d", &a, &d, &n);
  long double pos = 0.0;
  long double rest = d;
  rest = d - (4 * a * ((int)(d / (4 * a))));
  for (int i = 0; i < n; i++) {
    pos += rest;
    if (pos >= 4 * a) {
      pos -= 4 * a;
    }
    if (pos <= a) {
      printf("%Lf %Lf\n", pos, 0.0);
    } else {
      if (pos <= 2 * a) {
        printf("%Lf %Lf\n", a, pos - a);
      } else {
        if (pos <= 3 * a) {
          printf("%Lf %Lf\n", a - (pos - 2 * a), a);
        } else {
          printf("%Lf %Lf\n", 0.0, a - (pos - 3 * a));
        }
      }
    }
  }
}
