#include <bits/stdc++.h>
using namespace std;
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "RDLU";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int &x, int y, int mod = 1000000007) {
  x += y;
  if (x >= mod) x -= mod;
  assert(x >= 0 && x < mod);
}
void et() {
  puts("-1");
  exit(0);
}
int L = 1e8;
int qy(int x, int y) {
  printf("0 %d %d\n", x, y);
  fflush(stdout);
  int z;
  scanf("%d", &z);
  return z;
}
int T;
int rd() { return (rand() * L + rand()) % (L); }
vector<int> xl, yl;
void fmain(int tid) {
  for (T = -L; qy(T, T) == 0; T++)
    ;
  int x = -L + qy(-L, -L);
  int S = 7000;
  while (x <= L) {
    if (qy(x, T) == 0) xl.push_back(x);
    if (qy(T, x) == 0) yl.push_back(x);
    while (S + x <= L && qy(x + S, x + S) >= S) x += S;
    x++;
    while (x <= L) {
      int dis = qy(x, x);
      if (dis == 0) break;
      x += dis;
    }
  }
  printf("1 %d %d\n", (int)xl.size(), (int)yl.size());
  for (int c : xl) printf("%d ", c);
  puts("");
  for (int c : yl) printf("%d ", c);
  puts("");
}
int main() {
  int t = 1;
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
  }
  return 0;
}
