#include <cstdio>
#include <cmath>
using namespace std;

int main(){
	int n;
	while(scanf("%d", &n),n){
		int ans = -1; double dif = 1000000.0;
		for(int i = 0; i < n; i++){
			int x, h, w; scanf("%d%d%d",&x,&h,&w);
			if(dif > abs(22.0-(double)w*100.0*100.0/(double)h/(double)h)){
				dif = abs(22.0-(double)w*100.0*100.0/(double)h/(double)h);
				ans = x;
			} else if(dif==abs(22.0-(double)w*100.0*100.0/(double)h/(double)h)&&ans > h){
				ans = x;
			}
		}
		printf("%d\n", ans);
	}
}