#include <bits/stdc++.h>
using namespace std;
const int MAXL = 1e8;
vector<int> point;
vector<int> ans1, ans2;
int query(int x, int y) {
  static int res;
  printf("0 %d %d\n", x, y);
  fflush(stdout);
  scanf("%d", &res);
  return res;
}
void dfs(int l, int r) {
  if (l > r) return;
  int mid = (l + r) / 2;
  int d = query(mid, mid);
  if (d == 0) point.push_back(mid), d++;
  dfs(l, mid - d);
  dfs(mid + d, r);
}
int main() {
  dfs(-MAXL, +MAXL);
  sort(point.begin(), point.end());
  int t = -MAXL;
  while (true) {
    int p = lower_bound(point.begin(), point.end(), t) - point.begin();
    if (p == (int)point.size() || point[p] != t) break;
    t++;
  }
  for (int i = 0, iend = point.size(); i < iend; ++i) {
    int x = point[i];
    if (query(t, x) == 0) ans1.push_back(x);
    if (query(x, t) == 0) ans2.push_back(x);
  }
  swap(ans1, ans2);
  printf("1 %d %d\n", (int)ans1.size(), (int)ans2.size());
  for (int i = 0, iend = ans1.size(); i < iend; ++i) printf("%d ", ans1[i]);
  puts("");
  for (int i = 0, iend = ans2.size(); i < iend; ++i) printf("%d ", ans2[i]);
  puts("");
  fflush(stdout);
  return 0;
}
