#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T& num) {
  bool start = false, neg = false;
  char c;
  num = 0;
  while ((c = getchar()) != EOF) {
    if (c == '-')
      start = neg = true;
    else if (c >= '0' && c <= '9') {
      start = true;
      num = num * 10 + c - '0';
    } else if (start)
      break;
  }
  if (neg) num = -num;
}
inline int Q(int x, int y) {
  printf("0 %d %d\n", x, y);
  fflush(stdout);
  scanf("%d", &x);
  return x;
}
set<int> c;
void dfs(int l, int r) {
  if (l > r) return;
  int mid = l + (r - l) / 2;
  int d = Q(mid, mid);
  if (!d) c.insert(mid), d++;
  dfs(l, mid - d);
  dfs(mid + d, r);
}
set<int> V, H;
int main() {
  int n = 0, m = 0;
  int mx = (int)(1e8);
  dfs(-mx, mx);
  int s = mx;
  for (; c.count(s); s--)
    ;
  for (set<int>::iterator it = c.begin(); it != c.end(); it++) {
    int x = (*it);
    if (!Q(x, s)) V.insert(x), ++n;
    if (!Q(s, x)) H.insert(x), ++m;
  }
  printf("1 %d %d\n", n, m);
  for (set<int>::iterator it = V.begin(); it != V.end(); it++)
    printf("%d ", (*it));
  putchar('\n');
  for (set<int>::iterator it = H.begin(); it != H.end(); it++)
    printf("%d ", (*it));
  putchar('\n');
  fflush(stdout);
  return 0;
}
