#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 = (left+right)/2; d_1 = d(mid-1,0); d_2 = d(mid,0); d_3 = d(mid+1,0); while((d_1 < d_2 && d_2 < d_3) || (d_1 > d_2 && d_2 > d_3)){ if(d_1 < d_2 && d_2 < d_3){ right = mid; } if(d_1 > d_2 && d_2 > d_3){ left = mid; } mid = (left+right)/2; d_1 = d(mid-1,0); d_2 = d(mid,0); d_3 = d(mid+1,0); } min_x = mid; left = -200000000,right = 200000000; mid = (left+right)/2; d_1 = d(0,mid-1); d_2 = d(0,mid); d_3 = d(0,mid+1); while((d_1 < d_2 && d_2 < d_3) || (d_1 > d_2 && d_2 > d_3)){ if(d_1 < d_2 && d_2 < d_3){ right = mid; } if(d_1 > d_2 && d_2 > d_3){ left = mid; } mid = (left+right)/2; d_1 = d(0,mid-1); d_2 = d(0,mid); d_3 = d(0,mid+1); } min_y = mid; cout << "2 " << min_x << " " << min_y << endl; }