#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } long long query(int x, int y) { cout << "1 " << x << " " << y << endl; long long a; cin >> a; return a; } int main() { fast_io(); int n; cin >> n; int xl = -1e8 + 5, xr = 1e8 - 5, yl = -1e8 + 5, yr = 1e8 - 5; while (xl + 2 < xr) { int x1 = xl + (xr - xl) / 3; int x2 = xr - (xr - xl) / 3; long long a1 = query(x1, yl); long long a2 = query(x2, yl); if (a1 < a2) { xr = x2; } else { xl = x1; } } int x = xl; if (query(xr, yl) < query(xl, yl)) { x = xr; } while (yl + 2 < yr) { int y1 = yl + (yr - yl) / 3; int y2 = yr - (yr - yl) / 3; long long a1 = query(x, y1); long long a2 = query(x, y2); if (a1 < a2) { yr = y2; } else { yl = y1; } } int y = yl; if (query(x, yr) < query(x, yl)) { y = yr; } cout << "2 " << x << " " << y << endl; }