#include using namespace std; int d(int x,int y){ int result; cout << "1 " << x << " " << y << endl; cin >> result; return result; } int main(){ int min_x,min_y; int N; int d_1,d_2,d_3; cin >> N; int left = -200000000,right = 200000000; int mid = 0; while(1){ mid = (left+right)/2; d_1 = d(mid-1,0); d_2 = d(mid,0); d_3 = d(mid+1,0); if(d_1 < d_2 && d_2 < d_3){ right = mid + 1; } if(d_1 > d_2 && d_2 > d_3){ left = mid - 1; } if(d_1 >= d_2 && d_2 <= d_3){ break; } } min_x = mid; left = -200000000,right = 200000000; while(1){ mid = (left+right)/2; d_1 = d(0,mid-1); d_2 = d(0,mid); d_3 = d(0,mid+1); if(d_1 < d_2 && d_2 < d_3){ right = mid + 1; } if(d_1 > d_2 && d_2 > d_3){ left = mid - 1; } if(d_1 >= d_2 && d_2 <= d_3){ break; } } min_y = mid; cout << "2 " << min_x << " " << min_y << endl; }