#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, i, c, x1, o;
  double a, d, x = 0, l, a1;
  cin >> a >> d;
  cin >> n;
  cout << fixed << setprecision(4);
  a1 = a * 4;
  for (i = 0; i < n; i++) {
    x += d;
    x1 = int(x / a);
    if (x1 % 4 == 0) cout << x - a * x1 << " " << 0.0000 << "\n";
    if (x1 % 4 == 1) cout << a << " " << x - a * x1 << "\n";
    if (x1 % 4 == 2) cout << a - (x - a * x1) << " " << a << "\n";
    if (x1 % 4 == 3) cout << 0.0000 << " " << a - (x - a * x1) << "\n";
    o = int(x / a1);
    x = x - o * a1;
  }
  return 0;
}
