#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, b;
  cin >> a >> b;
  int n;
  cin >> n;
  double s = 0.0;
  for (int i = 0; i < n; i++) {
    s += b;
    s = fmod(s, 4 * a);
    double x, y;
    if (s <= a) {
      x = s;
      y = 0;
    } else if (s <= 2 * a) {
      x = a;
      y = s - a;
    } else if (s <= 3 * a) {
      x = a - (s - 2 * a);
      y = a;
    } else {
      x = 0;
      y = a - (s - 3 * a);
    }
    printf("%.17lf %.17lf\n", x, y);
  }
}
