#include<iostream>
#include<map>
#include<algorithm>
#include<cmath>
#define INF 1<<28
using namespace std;

int main(){

  int n;
  int a,b,c;

  while(cin >> n, n){

    int ans1 = INF;
    int  ans2 = INF;
    double p = INF,q = INF;

    for(int i=0;i<n;i++){
      cin >> a >> b >> c;
      double k = (double)b/100;
      double d = c/(k*k);

      if(p > abs(22-d)){
	p = abs(22-d);
	ans1 = a;
      }

      else if(p == abs(22-d) && ans1 > a) ans1 = a;

    }
    cout << ans1 << endl;

  }
}