#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int n;
  while (cin >> n, n) {
    int p[1010], h[1010], w[1010];
    for (int i = 0; i < n; i++) {
      cin >> p[i] >> h[i] >> w[i];
    }
    double diff = 1e9;
    for (int i = 0; i < n; i++) {
      double bmi = 1e4 * double(w[i]) / h[i] / h[i];
      if (abs(bmi - 22) < diff) {
        diff = abs(bmi - 22);
      }
    }
    vector<int> ans;
    for (int i = 0; i < n; i++) {
      double bmi = 1e4 * w[i] / h[i] / h[i];
      if (abs(bmi - 22) == diff) {
        ans.emplace_back(p[i]);
      }
    }
    sort(ans.begin(), ans.end());
    for (int i : ans) {
      cout << i << endl;
    }
  }

  return 0;
}
