#include <bits/stdc++.h>
using namespace std;
const int N = 2e4 + 5;
int t, d, q[N], top, lst, n, m, x[N], y[N];
int ask(int x, int y) {
  printf("0 %d %d\n", x, y);
  fflush(stdout);
  scanf("%d", &t);
  return t;
}
int main() {
  d = -1e8;
  for (; d <= 1e8;) {
    int t = ask(d, d);
    if (!t) {
      q[++top] = d;
      if (d + 1000 <= 1e8 && ask(d + 1000, d + 1000) == 1000)
        d += 1000;
      else
        d++;
    } else
      lst = d, d += t;
  }
  for (int i = 1; i <= top; i++) {
    if (!ask(q[i], lst)) x[++n] = q[i];
    if (!ask(lst, q[i])) y[++m] = q[i];
  }
  printf("1 %d %d\n", n, m);
  for (int i = 1; i <= n; i++) printf("%d ", x[i]);
  for (int i = 1; i <= m; i++) printf("%d ", y[i]);
  return 0;
}
