#include <bits/stdc++.h>
using namespace std;
vector<int> coord, h, v;
int temp = -100000000;
int ask(int x, int y) {
  cout << "0 " << x << " " << y << endl;
  int val;
  cin >> val;
  return val;
}
void bin(int l, int r) {
  if (r < l) {
    return;
  }
  int mid = (l + r) >> 1;
  int cur = ask(mid, mid);
  if (!cur) {
    coord.push_back(mid);
    cur += 1;
  }
  bin(l, mid - cur);
  bin(mid + cur, r);
}
int main() {
  bin(-100000000, 100000000);
  sort(coord.begin(), coord.end());
  for (int i = 0; i < coord.size(); i += 1) {
    if (coord[i] == temp) {
      temp += 1;
      continue;
    }
    if (coord[i] > temp) {
      break;
    }
  }
  for (int i = 0; i < coord.size(); i += 1) {
    if (ask(coord[i], temp) == 0) {
      v.push_back(coord[i]);
    }
    if (ask(temp, coord[i]) == 0) {
      h.push_back(coord[i]);
    }
  }
  cout << "1 " << v.size() << " " << h.size() << endl;
  for (int x : v) {
    cout << x << " ";
  }
  cout << endl;
  for (int x : h) {
    cout << x << " ";
  }
  cout << endl;
}
