#include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define rer(i,l,n) for(int i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int,int> pii;

int main(){
	while(1){
		int n,i,h,w,ans=0;
		double bmi,d=2000001;
		cin>>n;
		if(n==0) break;
		rep(j,0,n){
			cin>>i>>h>>w;
			bmi=(double)w/(h*h)*10000;
			//o(bmi);
			if(abs(22-bmi)<d){
				d=abs(22-bmi); ans=i;
			}if(abs(22-bmi)==d) ans=min(i,ans);
		}
		o(ans);
	}
}