#include <bits/stdc++.h>
using namespace std;
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
const int INF = 1 << 29;
int main() {
  double A, D;
  int N;
  scanf("%lf%lf%d", &A, &D, &N);
  for (int i = (1); i <= (N); ++i) {
    double m = fmod(i * D, 4 * A);
    if (m < A) {
      printf("%lf %lf\n", m, 0.0);
    } else if (m < 2 * A) {
      printf("%lf %lf\n", A, m - A);
    } else if (m < 3 * A) {
      printf("%lf %lf\n", 3 * A - m, A);
    } else {
      printf("%lf %lf\n", 0.0, 4 * A - m);
    }
  }
  return 0;
}
