#include <bits/stdc++.h>
using namespace std;
int n = 0, m = 0;
int base = 1234987;
int steps = -1e8;
int nxt;
int poi(int x, int y) {
  printf("0 %d %d\n", x, y);
  fflush(stdout);
  int answer;
  scanf("%d", &answer);
  return answer;
}
int ans[2][123456];
int main() {
  while (steps <= 1e8) {
    int liblibal = poi(steps, steps);
    if (liblibal) nxt = liblibal;
    if (!liblibal) {
      if (poi(steps, base) == 0) ans[0][++n] = steps;
      if (poi(base, steps) == 0) ans[1][++m] = steps;
      nxt = 1;
      if (steps + 1000 <= 1e8 && poi(steps + 1000, steps + 1000) == 1000)
        nxt = 1000;
    }
    steps += nxt;
  }
  cout << 1 << " " << n << " " << m << endl;
  for (int i = 1; i <= n; i++) printf("%d ", ans[0][i]);
  cout << endl;
  for (int i = 1; i <= m; i++) printf("%d ", ans[1][i]);
}
