#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

#define EPS (1e-10)
#define EQ(a,b) ((abs(a-b)<EPS))
const int INF=100000000;

int main(){

	int n;
	while(cin>>n&&n!=0){
		double reasonableBMI=INF;
		int bnum;
		for(int i = 0; i < n; i++){
			int n,w;
			double h;
			cin>>n>>h>>w;
			h/=100;
			double bmi=(double)w/(h*h);

			if(( abs(bmi-22)<abs(reasonableBMI-22))||(EQ(reasonableBMI,INF)) ){
				reasonableBMI=bmi;
				bnum=n;
			}
			else if(EQ(reasonableBMI,bmi)){
				if(bnum>n)
					bnum=n;
			}
		}
		cout<<bnum<<endl;
	}

	return 0;
}