#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main()
{
	int n;
	while(cin >> n && n)
	{
		int num,ans_num;
		double h,w,ans;
		
		rep(i,n)
		{
			cin >> num >> h >> w;
			
			h /= 100;
			double bmi = w / (h*h);

			if(i == 0)
			{
				ans_num = num;
				ans = fabs(22 - bmi);
			}
			else
			{
				if(fabs(22 - bmi) == ans)
				{
					ans_num = min(ans_num,num);
				}

				if(fabs(22 - bmi) < ans)
				{
					ans_num = num;
					ans = fabs(22 - bmi);
				}
			}
		}

		cout << ans_num << endl;
	}
	return 0;
}