#include <bits/stdc++.h>
using namespace std;
vector<int> a, b, all;
int rnd() {
  return (rand() % 10001) * (rand() % 10001) * (rand() % 2 ? 1 : -1);
}
int ask(int x, int y) {
  cout << 0 << " " << x << " " << y << endl;
  int d;
  cin >> d;
  return d;
}
bool row(int x) {
  for (int i = 0; i < 2; i += 1) {
    if (ask(x, rnd())) {
      return false;
    }
  }
  return true;
}
bool col(int y) {
  for (int i = 0; i < 2; i += 1) {
    if (ask(rnd(), y)) {
      return false;
    }
  }
  return true;
}
void solve(int x, int y) {
  if (y < x) {
    return;
  }
  int mid = (x + y) / 2, d = ask(mid, mid);
  if (d == 0) {
    all.push_back(mid), d = 1;
  }
  solve(x, mid - d), solve(mid + d, y);
}
int main() {
  solve(-100000000, 100000000);
  for (auto i : all) {
    if (row(i)) {
      b.push_back(i);
    }
    if (col(i)) {
      a.push_back(i);
    }
  }
  cout << 1 << " " << b.size() << " " << a.size() << endl;
  for (int i : b) {
    cout << i << " ";
  }
  cout << endl;
  for (int i : a) {
    cout << i << " ";
  }
  cout << endl;
}
