#include <bits/stdc++.h>
using namespace std;
const int MAX = (int)1e8;
int ask(int x, int y) {
  cout << 0 << " " << x << " " << y << endl;
  int d;
  cin >> d;
  return d;
}
void collect(vector<int> &a, int l, int r) {
  if (l > r) return;
  int m = (l + r) / 2;
  int d = ask(m, m);
  if (!d) {
    a.push_back(m);
    collect(a, l, m - 1);
    collect(a, m + 1, r);
  } else {
    collect(a, l, m - d);
    collect(a, m + d, r);
  }
}
int main() {
  vector<int> pt;
  collect(pt, -MAX, MAX);
  sort(pt.begin(), pt.end());
  int p = -MAX;
  for (int d : pt) {
    if (p == d) p++;
  }
  vector<int> xline, yline;
  for (int d : pt) {
    if (!ask(d, p)) xline.push_back(d);
    if (!ask(p, d)) yline.push_back(d);
  }
  cout << "1 " << xline.size() << " " << yline.size() << "\n";
  for (int x : xline) cout << x << " ";
  cout << "\n";
  for (int y : yline) cout << y << " ";
  return 0;
}
