#include <bits/stdc++.h>
using namespace std;
const int INF = 1e8;
vector<int> pos;
int tmp;
inline int query(int x, int y) {
  cout << "0 " << x << ' ' << y << endl;
  fflush(stdout);
  int res;
  cin >> res;
  return res;
}
void calc(int l, int r) {
  if (l > r) return;
  int mid = (l + r) >> 1, d = query(mid, mid);
  if (d == 0)
    pos.push_back(mid), d = 1;
  else
    tmp = mid;
  calc(l, mid - d), calc(mid + d, r);
}
vector<int> vx, vy;
inline void solve() {
  calc(-INF, INF);
  for (int p : pos) {
    if (!query(p, tmp)) vx.push_back(p);
    if (!query(tmp, p)) vy.push_back(p);
  }
}
int main() {
  solve();
  cout << "1 " << vx.size() << ' ' << vy.size() << endl;
  for (int x : vx) cout << x << ' ';
  cout << endl;
  for (int y : vy) cout << y << ' ';
  cout << endl;
  return 0;
}
