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

using namespace std;

int main() {
	int n;
	int bango,meter,taiju;
	int risoban;
	double riso;
	double riri;
	double BMI;

	while (1) {
		cin >> n;
		if (n == 0) {
			break;
		}
		for (int i = 0; i < n; i++) {
			cin >> bango >> meter >> taiju;
			BMI = (double)taiju / ((double)pow(meter,2) / 10000.0);
			if (i == 0) {
				risoban = bango;
				if (BMI < 22.0) {
					riso = 22.0 - BMI;
				} else {
					riso = BMI - 22.0;
				}
			} else {
				riri = BMI - 22.0;
				if (riri < 0) {
					riri = -riri;
				}
				if (riri < riso) {
					riso = riri;
					risoban = bango;
				}
			}
		}
		cout << risoban << endl;
	}
	return 0;
}