#include <bits/stdc++.h>
using namespace std;
const int N = 100000000;
inline int ask(int x, int y) {
  cout << "0 " << x << ' ' << y << endl;
  int ret;
  cin >> ret;
  return ret;
}
default_random_engine e;
vector<int> ansx, ansy;
int main() {
  ios::sync_with_stdio(false);
  e.seed(0);
  uniform_int_distribution<int> u(-N, N);
  int t = u(e);
  while (!ask(t, t)) t = u(e);
  int x = -N + ask(-N, -N), step = 7000;
  while (x <= N) {
    if (!ask(x, t)) ansx.push_back(x);
    if (!ask(t, x)) ansy.push_back(x);
    while (x + step <= N && ask(x + step, x + step) >= step) x += step;
    x++;
    while (x <= N) {
      int d = ask(x, x);
      if (!d) break;
      x += d;
    }
  }
  cout << 1 << ' ' << ansx.size() << ' ' << ansy.size() << endl;
  for (auto &i : ansx) cout << i << ' ';
  cout << endl;
  for (auto &i : ansy) cout << i << ' ';
  cout << endl;
  return 0;
}
