#include <iostream>
#include <cstdio>
#include <math.h>

const int INF = 1000000, SBMI = 22;

int main(){
	int n;
	while(std::cin >> n, n){
		double bbmi = INF;
		int bn = 0;
		while(n--){
			//Input
			int i;
			double w, h, bmi;
			std::cin >> i >> h >> w;

			//Processing
			bmi = w / ((h / 100) * (h / 100));
			//WÆÌ·ÅxXgBMIðßéD
			if(fabs(bbmi - SBMI) > fabs(bmi - SBMI))bbmi = bmi, bn = i;
		}
		printf("%d\n", bn);
	}
}