#include <bits/stdc++.h>
using namespace std;
int p[100005], cnt, h[100005], cnth, l[100005], cntl, cntquery;
int query(int x, int y) {
  printf("0 %d %d\n", x, y);
  fflush(stdout);
  int ret;
  scanf("%d", &ret);
  cntquery++;
  if (cntquery > 300000)
    while (1)
      ;
  return ret;
}
int main() {
  int t = 0, q, X;
  for (int x = -100000000; x <= 100000000;) {
    q = query(x, x);
    if (q == 0) {
      p[++cnt] = x;
      x++;
    } else if (q < 100 && x + 100 * 2 <= 100000000 &&
               query(x + 100, x + 100) >= 100) {
      X = x;
      x += 100 * 2;
    } else {
      X = x;
      x += q;
    }
  }
  for (int i = 1; i <= cnt; i++) {
    q = query(p[i], X);
    if (q == 0) l[++cntl] = p[i];
    q = query(X, p[i]);
    if (q == 0) h[++cnth] = p[i];
  }
  printf("1 %d %d\n", cntl, cnth);
  for (int i = 1; i <= cntl; i++) printf("%d ", l[i]);
  puts("");
  for (int i = 1; i <= cnth; i++) printf("%d ", h[i]);
  puts("");
  return 0;
}
