#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <queue>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
#define INF 1<<30

int main() {
  int n;
  while(cin >> n, n) {
    double mi = INF;
    int res;
    REP(i,n) {
      int a;
      double h, w;
      cin >> a >> h >> w;

      double hoge = abs(22.0-10000.0*w/(h*h));
      if (mi >= hoge) {
        if (mi == hoge) {
          if (a < res)
            res = a;
        } else {
          mi = hoge;
          res = a;
        }
      }
    }
    cout << res << endl;
  }
}