#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
double bmi(double h, double w){
	return w/((h/100)*(h/100));
}

int main(){
	int n, p;
	double h, w;
	const double c = 22;
	while(true){
		cin >> n;
		if(n == 0)
			return 0; 
		int num;
		double diff;
		for(int i = 0; i < n; i++){
			cin >> p >> h >> w;
			if(i == 0){
				num = p;
				diff = abs(bmi(h,w) - c);
			}else{
				double k = abs(bmi(h,w) - c);
				if(diff > k){
					diff = k;
					num = p;
				}else if(diff == k){
					if(num > p)
						num = p;
				}
			}
		}
		cout << num << endl;
	}

}