#include <iostream>

using namespace std;

int main(int argc, char **argv)
{
	int n, id, s;
	double h, w, t, tmp;
	
	while(1){
		cin >> n;
		if(n == 0){
			break;
		}
		
		cin >> s >> h >> w;
		t = (w / (h*h))* 10000 - 22.0;
		
		if(t < 0){
			t = -t;
		}

		for(int i = 1; i < n; i++){
			cin >> id >> h >> w;
			
			tmp = (w / (h*h))*10000 - 22.0;
			if(tmp < 0){
				tmp = -tmp;
			}
			
			if(t > tmp){
				t = tmp;
				s = id;
			}
		}
		
		cout << s << endl;
	}
	
	return 0;
}