#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <cstring>
#include <deque>
#include <cstdio>
#include <cmath>
#include <complex>
#include <iostream>
#include <iterator>

using namespace std;

#define reep(i,f,t) for(int i=f ; i<int(t) ; ++i)
#define rep(i,n) reep(i, 0, n) 

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

const double EPS = 1e-8;

int main()
{
	int n;
	while(scanf("%d", &n), n){
		int id = -1;
		double diff;
		rep(i, n){
			int i, h, w;
			scanf("%d%d%d", &i, &h, &w);
			double H = h / 100.0;
			double d = fabs(22.0 - w / H / H);
			
			if(id == -1){
				diff = d;
				id = i;
			}
			else if(fabs(diff - d) < EPS)
				id = min(id, i);
			else if(diff > d){
				diff = d;
				id = i;
			}
		}
		
		printf("%d\n", id);
	}
	
	return 0;
}