#include using namespace std; using namespace chrono; #if __has_include() #include using namespace atcoder; #endif int main() { int64_t n; cin >> n; int64_t x = [&] { int64_t l = -100000000, r = 100000000; while (2 < abs(l - r)) { int64_t ml = (2 * l + r) / 3; int64_t mr = (l + 2 * r) / 3; int64_t dl, dr; cout << 1 << ' ' << ml << ' ' << 0 << endl; cin >> dl; cout << 1 << ' ' << mr << ' ' << 0 << endl; cin >> dr; if (dl < dr) { r = mr; } else { l = ml; } } return l + 1; }(); int64_t y = [&] { int64_t l = -100000000, r = 100000000; while (2 < abs(l - r)) { int64_t ml = (2 * l + r) / 3; int64_t mr = (l + 2 * r) / 3; int64_t dl, dr; cout << 1 << ' ' << 0 << ' ' << ml << endl; cin >> dl; cout << 1 << ' ' << 0 << ' ' << mr << endl; cin >> dr; if (dl < dr) { r = mr; } else { l = ml; } } return l + 1; }(); int64_t tmp = (1LL << 60); for (int64_t nx : {x, x + 1}) { for (int64_t ny : {y, y + 1}) { cout << 1 << ' ' << nx << ' ' << ny << endl; int64_t d; cin >> d; if (d < tmp) { x = nx; y = ny; tmp = d; } } } cout << 2 << ' ' << x << ' ' << y << endl; return 0; }