#include <bits/stdc++.h>
std::mt19937 rng(std::chrono::steady_clock::now().time_since_epoch().count());
int Rand(int l, int r) { return std::uniform_int_distribution(l, r)(rng); }
int main() {
  std::ofstream fout("plant.in");
  int T = 5;
  fout << T << ' ' << 0 << '\n';
  while (T--) {
    int n = Rand(901, 1000), m = Rand(901, 1000);
    fout << n << ' ' << m << ' ' << 1 << ' ' << 1 << '\n';
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) fout << (Rand(1, 10) == 15);
      fout << '\n';
    }
  }
  return 0;
}