#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T a, T b) {
  T r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
const double PI = 2 * acos(0.0);
const double eps = 1e-9;
const int infi = (int)1e9;
const long long Linfi = (long long)1e10;
double a, d;
int n;
double x, y;
double Dmod(double a, double b) {
  double th = a / b;
  long long thuong = (long long)(th);
  double ans = a - thuong * b;
  return ans;
}
void thuchien() {
  double mod = a * 4;
  for (int i = 1; i <= n; i++) {
    double tmp = i * d;
    tmp = Dmod(tmp, mod);
    if (tmp >= 0 && tmp < a) {
      x = tmp;
      y = 0;
      printf("%.4lf %.4lf\n", x, y);
    } else if (tmp >= a && tmp < 2 * a) {
      x = a;
      y = Dmod(tmp, a);
      printf("%.4lf %.4lf\n", x, y);
    } else if (tmp >= 2 * a && tmp < 3 * a) {
      x = a - Dmod(tmp, a);
      y = a;
      printf("%.4lf %.4lf\n", x, y);
    } else if (tmp >= 3 * a && tmp < 4 * a) {
      x = 0;
      y = a - Dmod(tmp, a);
      printf("%.4lf %.4lf\n", x, y);
    }
  }
}
int main() {
  cin >> a >> d >> n;
  thuchien();
  return 0;
}
