#include<iostream>
#include<vector>
#include<string>
#include<map>
#define int double
using namespace std;

signed main()
{
	int a;
	while (cin >> a, a) {
		map<int, int>s;
		for (int b = 0; b < a; b++) {
			int c, d, e;
			cin >> c >> d >> e;
			int f = e / d / d * 10000;
			if (f > 22) {
				s.insert(pair<int, int>(f-22,c));
			}
			else {
				s.insert(pair<int, int>(22-f,c));
			}
		}
		auto j = s.begin();
		cout << j->second << endl;
	}
}