#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;

int main() {
	int n;
	while (cin >> n, n) {
		int index;
		double Min = (double)INT_MAX;
		rep(i, n) {
			int I; double h, w; cin >> I >> h >> w; h /= 100;
			double d = abs(22. - (w / (h*h)));
			if (d < Min) {
				index = I; Min = d;
			}
			if (d == Min) {
				index = min(index, I);
			}
		}
		cout << index << endl;
	}
}