#include <bits/stdc++.h>
using namespace std;
int n;
double a, d;
double x, y;
char tr;
void print(double x, double y, double dis, int dir) {
  if (n == 0) return;
  switch (dir) {
    case 0:
      if (x >= dis) {
        x = x - dis;
        n--;
        printf("%lf %lf\n", x, y);
        print(x, y, d, dir);
      } else {
        double t = x;
        x = 0;
        print(x, y, dis - t, 3);
      }
      break;
    case 1:
      if (x + dis <= a) {
        x = x + dis;
        n--;
        printf("%lf %lf\n", x, y);
        print(x, y, d, dir);
      } else {
        double t = x;
        x = a;
        print(x, y, dis - (a - t), 2);
      }
      break;
    case 2:
      if (y + dis <= a) {
        double t = y;
        y = y + dis;
        n--;
        printf("%lf %lf\n", x, y);
        print(x, y, d, dir);
      } else {
        double t = y;
        y = a;
        print(x, y, dis - (a - t), 0);
      }
      break;
    case 3:
      if (y >= dis) {
        y = y - dis;
        n--;
        printf("%lf %lf\n", x, y);
        print(x, y, d, dir);
      } else {
        double t = y;
        y = 0;
        print(x, y, dis - t, 1);
      }
      break;
  }
}
void PreProcess() {
  while (d > 4 * a) {
    d -= 4 * a;
  }
}
int main() {
  while (scanf("%lf%lf%d", &a, &d, &n) != EOF) {
    x = 0, y = 0;
    PreProcess();
    print(x, y, d, 1);
  }
}
