#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int SIZE = 1e6 + 10;
const int MAX_V = 10000 * 10000;
int qq(int x, int y) {
  printf("0 %d %d\n", x, y);
  fflush(stdout);
  int(v);
  scanf("%d", &v);
  return v;
}
vector<int> mid;
void go(int ll, int rr) {
  if (ll + 1 >= rr) return;
  int mm = ll + (rr - ll) / 2;
  int res = qq(mm, mm);
  int nxt = mm + res;
  if (nxt != rr && qq(nxt, nxt) == 0) {
    mid.push_back(nxt);
    go(ll, nxt);
    go(nxt, rr);
    return;
  }
  nxt = mm - res;
  if (nxt != ll && qq(nxt, nxt) == 0) {
    mid.push_back(nxt);
    go(ll, nxt);
    go(nxt, rr);
  }
}
int main() {
  int ll = -MAX_V + qq(-MAX_V, -MAX_V);
  int rr = MAX_V - qq(MAX_V, MAX_V);
  mid.push_back(ll);
  mid.push_back(rr);
  go(ll, rr);
  sort((mid).begin(), (mid).end());
  mid.resize(unique((mid).begin(), (mid).end()) - mid.begin());
  int emp = -MAX_V;
  while (binary_search((mid).begin(), (mid).end(), emp)) emp++;
  vector<int> xx, yy;
  for (int i = 0; i < (((int)(mid).size())); ++i) {
    if (qq(mid[i], emp) == 0) xx.push_back(mid[i]);
    if (qq(emp, mid[i]) == 0) yy.push_back(mid[i]);
  }
  printf("1 %d %d\n", ((int)(xx).size()), ((int)(yy).size()));
  fflush(stdout);
  for (int i = 0; i < (((int)(xx).size())); ++i) {
    if (i) printf(" ");
    printf("%d", xx[i]);
  }
  puts("");
  fflush(stdout);
  for (int i = 0; i < (((int)(yy).size())); ++i) {
    if (i) printf(" ");
    printf("%d", yy[i]);
  }
  puts("");
  fflush(stdout);
  return 0;
}
