#include <iostream>
#include <set>
#include <math.h>
#include <vector>
using namespace std;

int main(){
	int n;
	int Id;
	double cm,kg;
	while(cin >> n && n){
		double mi   = 1000000.0;
		int miId = -1;
		for(int i=0;i<n;i++){
			cin >> Id >> cm >> kg;
			if(fabs(22.0 - kg/(cm/100)/(cm/100))<mi){
				mi = fabs(22.0 - kg/(cm/100)/(cm/100));
				miId = Id;
			}
		}
		cout << miId << endl;
			
	}
}