#include "testlib.h"

int main(int argc, char **argv) {
  registerGen(argc, argv, 1);

  int t = opt<int>("t");
  int n = opt<int>("n");
  int c = opt<int>("c");
  printf("%d\n", t);
  for (int i = 0; i < t; i++) {
    printf("%d\n", n);
    for (int i = 0; i < n; i++) {
      int x1 = 0, y1 = 0;
      int x2 = c, y2 = i;
      if (i % 2 == 0) {
        x2 = i;
        y2 = c;
        x1 = -x2;
        y1 = -y2;
      }
      printf("%d %d %d %d\n", x1, y1, x2, y2);
    }
  }
}
