#include <bits/stdc++.h>
using namespace std;
int tt[500005], h, hh = 19260817, anss[3][500005], n, m, ttt;
int work(int x, int y) {
  ttt++;
  if (ttt >= 300000)
    while (1)
      ;
  printf("%d %d %d\n", 0, x, y);
  fflush(stdout);
  int ans;
  scanf("%d", &ans);
  return ans;
}
int main() {
  int t = -100000000;
  while (1) {
    int ans = work(t, t);
    if (ans == 0) {
      tt[++h] = t;
      if (t + 1000 <= 1e8 && work(t + 1000, t + 1000) == 1000)
        t += 1000;
      else
        t++;
    } else
      t += ans;
    if (t > 100000000) break;
  }
  for (int i = 1; i <= h; i++) {
    int ans = work(tt[i], hh);
    if (!ans) anss[1][++n] = tt[i];
    ans = work(hh, tt[i]);
    if (!ans) anss[2][++m] = tt[i];
  }
  printf("%d %d %d\n", 1, n, m);
  for (int i = 1; i <= n; i++) {
    printf("%d ", anss[1][i]);
  }
  printf("\n");
  for (int i = 1; i <= m; i++) {
    printf("%d ", anss[2][i]);
  }
  printf("\n");
  return 0;
}
