#include <bits/stdc++.h>
using namespace std;
int d, X;
int n, m, x[10010], y[10010];
void ask(int u, int v) {
  printf("0 %d %d\n", u, v);
  fflush(stdout);
  scanf("%d", &d);
  if (d and u == v) X = u;
}
vector<int> ans, ansx, ansy;
void sol(int st, int ed) {
  int md = st + ed >> 1;
  ask(md, md);
  int dist = d;
  if (d == 0) {
    ans.push_back(md);
    if (md < ed - 1) sol(md, ed);
    if (md > st + 1) sol(st, md);
  } else {
    if (dist < ed - md) {
      ask(md + dist, md + dist);
      if (d == 0) ans.push_back(md + dist);
      if (md + dist < ed - 1) sol(md + dist, ed);
    }
    if (dist < md - st) {
      ask(md - dist, md - dist);
      if (d == 0) ans.push_back(md - dist);
      if (md - dist > st + 1) sol(st, md - dist);
    }
  }
}
int main() {
  int ed = 1e8 + 1;
  sol(-ed, ed);
  for (int v : ans) {
    ask(v, X);
    if (d == 0) ansx.push_back(v);
    ask(X, v);
    if (d == 0) ansy.push_back(v);
  }
  printf("1 %d %d\n", ansx.size(), ansy.size());
  for (int v : ansx) printf("%d ", v);
  puts("");
  for (int v : ansy) printf("%d ", v);
  puts("");
  return 0;
}
