#include <bits/stdc++.h>
using namespace std;
const int limit = 100000000;
struct section {
  int inf, sup;
  section() {}
  section(int inf, int sup) : inf(inf), sup(sup) {}
};
int size(section s) { return s.sup - s.inf; }
bool operator<(section s1, section s2) { return size(s1) < size(s2); }
void escribe(set<int> &s) {
  bool primero = true;
  for (set<int>::iterator it = s.begin(); it != s.end(); it++) {
    if (not primero) cout << " ";
    primero = false;
    cout << *it;
  }
  cout << endl;
  cout.flush();
}
void escribe(string s, priority_queue<section> q) {
  cout << s << ": ";
  while (not q.empty()) {
    section sec = q.top();
    q.pop();
    cout << "(" << sec.inf << "," << sec.sup << ")";
  }
  cout << endl;
}
priority_queue<section> qlive[2];
priority_queue<section> qdeath[2];
section sec[2];
int known[2];
set<int> sol[2];
int absolut(int x) {
  if (x < 0) return -x;
  return x;
}
int distancia(int x, set<int> s) {
  int d = 2 * limit;
  for (set<int>::iterator it = s.begin(); it != s.end(); it++)
    d = min(d, absolut((*it) - x));
  return d;
}
int pregunta(int x, int y) {
  cout << 0 << " " << x << " " << y << endl;
  cout.flush();
  int d;
  cin >> d;
  if (d == -1) exit(0);
  return d;
}
int X0, Y0;
void localiza0() {
  X0 = -limit;
  Y0 = -limit;
  for (int d = 0; d < limit; d++, X0++, Y0++)
    if (pregunta(X0, Y0)) return;
}
int main() {
  ios::sync_with_stdio(false);
  localiza0();
  for (int i = 0; i < 2; i++) qlive[i].push(section(-limit, limit));
  while (not qlive[0].empty() or not qlive[1].empty()) {
    if (not qlive[0].empty() and not qlive[1].empty()) {
      sec[0] = qlive[0].top();
      qlive[0].pop();
      known[0] = false;
      sec[1] = qlive[1].top();
      qlive[1].pop();
      known[1] = false;
    } else if (not qlive[0].empty()) {
      sec[0] = qlive[0].top();
      qlive[0].pop();
      known[0] = false;
      sec[1] = qdeath[1].top();
      known[1] = true;
    } else if (not qlive[1].empty()) {
      sec[0] = qdeath[0].top();
      known[0] = true;
      sec[1] = qlive[1].top();
      qlive[1].pop();
      known[1] = false;
    }
    int xl = sec[0].inf;
    int xr = sec[0].sup;
    int yl = sec[1].inf;
    int yr = sec[1].sup;
    int dx = xr - xl;
    int dy = yr - yl;
    int d = min(dx, dy);
    int d2 = d / 2;
    int xc = xl + d2;
    int yc = yl + d2;
    int dist = pregunta(xc, yc);
    if (dist > d2) {
      if (not known[0]) {
        qdeath[0].push(
            section(max(-limit, xc - dist + 1), min(limit, xc + dist - 1)));
        if (xc + dist <= xr) qlive[0].push(section(xc + dist, xr));
      }
      if (not known[1]) {
        qdeath[1].push(
            section(max(-limit, yc - dist + 1), min(limit, yc + dist - 1)));
        if (yc + dist <= yr) qlive[1].push(section(yc + dist, yr));
      }
    } else {
      if (not known[0]) {
        if (pregunta(xc - dist, Y0) == 0) {
          sol[0].insert(xc - dist);
          if (0 < d2 - dist) qlive[0].push(section(xl, xc - dist - 1));
          if (xc - dist < xr) qlive[0].push(section(xc - dist + 1, xr));
        } else if (dist > 0 and pregunta(xc + dist, Y0) == 0) {
          sol[0].insert(xc + dist);
          qlive[0].push(section(xl, xc + dist - 1));
          if (xc + dist < xr) {
            qlive[0].push(section(xc + dist + 1, xr));
          }
        } else {
          if (dist > 0) qdeath[0].push(section(xc - dist + 1, xc + dist - 1));
          if (0 < d2 - dist) qlive[0].push(section(xl, xc - dist - 1));
          if (xc + dist < xr) qlive[0].push(section(xc + dist + 1, xr));
        }
      }
      if (not known[1]) {
        if (pregunta(X0, yc - dist) == 0) {
          sol[1].insert(yc - dist);
          if (0 < d2 - dist) qlive[1].push(section(yl, yc - dist - 1));
          if (yc - dist < yr) qlive[1].push(section(yc - dist + 1, yr));
        } else if (dist > 0 and pregunta(X0, yc + dist) == 0) {
          sol[1].insert(yc + dist);
          qlive[1].push(section(yl, yc + dist - 1));
          if (yc + dist < yr) {
            qlive[1].push(section(yc + dist + 1, yr));
          }
        } else {
          if (dist > 0) qdeath[1].push(section(yc - dist + 1, yc + dist - 1));
          if (0 < d2 - dist) qlive[1].push(section(yl, yc - dist - 1));
          if (yc + dist < yr) qlive[1].push(section(yc + dist + 1, yr));
        }
      }
    }
  }
  cout << "1 " << int(sol[0].size()) << " " << int(sol[1].size()) << endl;
  cout.flush();
  escribe(sol[0]);
  escribe(sol[1]);
}
