#include<iostream>
using namespace std;

double num[1000000],h[1000000],w[1000000];
int n;

int main(){
	while(true){
		int ans = 0;
		cin >> n;
		if(!n)
			return 0;
		for(int i=0; i<n; i++){
			cin >> num[i] >> h[i] >> w[i];
			h[i] /= 100;
			h[i] *= h[i];
			w[i] /= h[i];
			w[i] -= 22;
			if(w[i] < 0)
				w[i] *= -1;
			if(w[ans] > w[i]){
				ans = i;
			}else if(w[ans] == w[i] && num[ans] > num[i])
				ans = i;
		}
		cout << num[ans] << endl;
	}
}