#include<iostream>
#include<cmath>

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

const double INF = 1e40;
const double EPS = 1e-8;

int main() {
  int n;
  while (true) {
    cin >> n;
    if (n == 0) break;
    int ans = -1;
    double dif = INF;
    rep (i, n) {
      int k;
      double h, w;
      cin >> k >> h >> w;
      h /= 100;
      if (dif > abs(22 - w / h / h)) {
	ans = k;
	dif = abs(22 - w / h / h);
      }
    }
    cout << ans << endl;
  }
  return 0;
}