#include <bits/stdc++.h>
using namespace std;

// #define int long long

/* cpp template {{{ */

/* short */
#define pb push_back
#define print(x) cout << x << '\n'
#define Fi first
#define Se second

/* REPmacro */
#define REPS(i, a, n) for (int i = (a); i < (n); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = 1; i <= (n); i++)
#define DEPS(i, a, n) for (int i = (a); i >= n; i--)
#define DEP(i, n) for (int i = (n); i >= 0; i--)

/* typedef */
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef pair<int, int> pii;

/* const */
const int INF = INT_MAX;
const int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};

/* func */
inline bool is_uruu(int y) {return (y % 4 == 0 && (y % 100 != 0 || y % 400 == 0));}
inline bool is_inside(int y, int x, int H, int W) {return (y >= 0 && x >= 0 && y < H && x < W);}

/* }}} */

const double BEST = 22.0;

signed main()
{
  ios::sync_with_stdio(false);
  int n;
  
  for (; cin >> n, n;){
    // Fi->number Se->bmi_diff
    vector<pair<int, double> > body(n);

    REP(i, n){
      double h, w;
      cin >> body[i].Fi >> h >> w;
      h /= 100;
      body[i].Se = fabs(BEST - w / (h * h));
    }

    pair<int, double> ans(body[0].Fi, body[0].Se);
    RREP(i, n - 1){
      if (body[i].Se <= ans.Se){
        if (body[i].Se == ans.Se){
          if (body[i].Fi < ans.Fi){
            ans = body[i];
          }
        } else {
          ans = body[i];
        }
      }
    }

    print(ans.Fi);
  }
  return (0);
}