// Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		int n;
		cin >> n;

		if(n==0)
			break;

		double b_min = 2000000.0;
		int m_min = 0;
		for(int i=0; i<n; i++){
			int m, h, w;
			cin >> m >> h >> w;

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

			if(b<b_min||(b==b_min&&m<m_min)){
				b_min = b;
				m_min = m;
			}
		}

		cout << m_min << endl;
	}

	return 0;
}