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

int main()
{
	int n, i, a;
	double b, c;
	map<double, int> m;
	map<double, int>::iterator it;
	while (cin>>n, n) {
		m.clear();
		for (i = 0; i < n; i++) {
			cin>>a>>b>>c;
			c = 22.0 - (10000.0*c/b/b);
			if (c<0) c *= -1;
			if (m.count(c)) {
				if (m[c] > a) m[c] = a;
			}
			else m[c] = a;
		}
		cout<<(*m.begin()).second<<endl;
	}
	return 0;
}