#include <cmath>
#include <iostream>
using namespace std;
int n, d, h, w, p;
int main() {
	while(scanf("%d", &n), n) {
		double s = 1.0e6;
		for(int i = 0; i < n; i++) {
			scanf("%d%d%d", &d, &h, &w);
			double r = abs(22.0 - 10000.0 * w / h / h);
			if(r < s) s = r, p = d;
		}
		printf("%d\n", p);
	}
	return 0;
}