#include <iostream>
#include <cmath>
using namespace std;

int main(){
	int n;
	while(cin >> n,n){
		int num;
		double mi = 1e+9;
		for(int i = 0;i < n;i++){
			int p;
			double h,w;
			cin >> p >> h >> w; h /= 100.0;
			double d = abs(22.0 - w / h / h);
			if(abs(mi - d) < 1e-8) num = min(num,p);
			else if(mi > d) {
				num = p;
				mi = d;
			}
		}
		cout << num << endl;
	}
	return 0;
}