#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cctype>
#include<complex>
#include<iostream>
#include<sstream>
#include<algorithm>
#include<functional>
#include<vector>
#include<string>
#include<stack>
#include<queue>
#include<map>

using namespace std;
const int dx[] = {1,0,-1,0},dy[] = {0,1,0,-1};
#define INF 10000000
#define rep(i,j) for(int i=0;i<(j);++i)
#define reps(i,j,k) for(int i=j;i<k;++i)
typedef long long ll;
typedef unsigned long long ull;
int main(){
	int n;
	while(scanf("%d",&n),n){
		int res = 0;
		double mi = INF;
		rep(i,n){
			int mem;
			double h,w;
			scanf("%d",&mem);
			scanf("%lf%lf",&h,&w);
			double x = fabs(22.0-(w/(h/100)/(h/100)));
			if(mi > x){
				mi = x;
				res = mem;
			}
			else if(mi == x){
				res = min(res,mem);
			}
		}
		printf("%d\n",res);
	}
	return 0;
}