#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, d;
  int n;
  scanf("%lf %lf", &a, &d);
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    double dis = (i + 1) * d;
    double side = dis / a;
    long long int sidei = (long long)side;
    sidei = sidei % 4;
    if (sidei == 0)
      printf("%0.10lf %0.10lf", fmod(dis, a), 0.0);
    else if (sidei == 1)
      printf("%0.10lf %0.10lf", a, fmod(dis, a));
    else if (sidei == 2)
      printf("%0.10lf %0.10lf", a - fmod(dis, a), a);
    else
      printf("%0.10lf %0.10lf", 0.0, a - fmod(dis, a));
    printf("\n");
  }
}
