#include <bits/stdc++.h>
using namespace std;
int pp[200005];
int respon;
int ppsz;
int bisa;
int ask(int x, int y) {
  cout << "0 " << x << " " << y << endl;
  cin >> respon;
  return respon;
}
void find_pp(int l, int r) {
  if (l > r) return;
  int mid = (l + r) / 2;
  int lul = ask(mid, mid);
  if (ask(mid, mid) == 0) {
    pp[++ppsz] = mid;
    lul = 1;
  } else
    bisa = mid;
  find_pp(l, mid - lul);
  find_pp(mid + lul, r);
}
int verver[10004];
int horhor[10004];
int main() {
  ios_base::sync_with_stdio(0);
  find_pp(-1e8, 1e8);
  int hor = 0, ver = 0;
  for (int i = 1; i <= ppsz; i++) {
    int pos = pp[i];
    if (ask(pos, bisa) == 0) {
      ver++;
      verver[ver] = pos;
    }
    if (ask(bisa, pos) == 0) {
      hor++;
      horhor[hor] = pos;
    }
  }
  cout << "1 " << ver << " " << hor << "\n";
  for (int i = 1; i <= ver; i++) {
    cout << verver[i] << " ";
  }
  cout << "\n";
  for (int i = 1; i <= hor; i++) {
    cout << horhor[i] << " ";
  }
  cout << "\n";
}
