// 2011/03/01 Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		int n;
		cin >> n;
		if(n==0)
			break;

		double b22_min = 2000000.0;
		int    num_min = 0;
		for(int i=0; i<n; i++){
			int num, h, w;
			cin >> num >> h >> w;

			double bmi = (double)(w*10000)/(double)(h*h);
			double b22 = bmi-22.0;
			if(b22<0.0)
				b22 = -b22;

			if(b22<b22_min||(b22==b22_min&&num<num_min)){
				b22_min = b22;
				num_min = num;
			}
		}

		cout << num_min << endl;
	}

	return 0;
}