#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
int main() {
	int n;
	while (cin >> n){
		if (n == 0)return 0;
		int maxnum;
		double maxbmi;
		int num;
		double x, y;
		cin >> num >> x >> y;
		x /= 100;
		x *= x;
		y /= x;
		maxnum = num;
		maxbmi = y;
		for (int i = 1; i < n; i++){
			cin >> num >> x >> y;
			x /= 100;
			x *= x;
			y /= x;
			if (abs(22 - maxbmi) > abs(22 - y)){
				maxnum = num;
				maxbmi = y;
			}
			else if (abs(22 - maxbmi) == abs(22 - y)){
				maxnum = min(maxnum, num);
			}
		}
		cout << maxnum << endl;
	}
}