#include <iostream>
#include <cmath>
using namespace std;
int n,i;
int main(){
	int a,out;
	double h,w,to,tn;
	while(cin >> n && n){
		out = 0;
		tn = 100;
		for(i=0;i<n;i++){
			cin >> a >> h >> w;
			h /= 100;
			to = fabs(22-(w/(h*h)));
			if(tn > to) {
				out = a;
				tn = to;
			}
			else if(tn == to && a < out){
				out = a;
				tn = to;
			}
		}
		cout << out << endl;
	}
	return 0;
}