#include <bits/stdc++.h>
using namespace std;
int n;
double a, d;
int main() {
  while (~scanf("%lf %lf", &a, &d)) {
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      long long cnt = (long long)(d * i / a);
      int dir = cnt % 4 + 1;
      if (dir == 1) {
        printf("%.7f %.7f\n", d * i - a * cnt, 0.0);
      } else if (dir == 2) {
        printf("%.7f %.7f\n", a, d * i - a * cnt);
      } else if (dir == 3) {
        printf("%.7f %.7f\n", a - (d * i - a * cnt), a);
      } else
        printf("%.7f %.7f\n", 0.0, a - (d * i - a * cnt));
    }
  }
  return 0;
}
