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

int main(){
  int n;
  while(cin >> n , n){
    int name;
    int ans;
    double near = -1;
    for(int i=0;i<n;i++){
      double w,h;
      cin >> name >> h >> w;
      double tmp = w / ((h/100)*(h/100));
      if(near == -1 || fabs(22.0-tmp) < fabs(22.0-near)){
	near = tmp;
	ans = name;
      }
      else if(fabs(22.0-tmp) == fabs(22.0-near)){
	if(name < ans){
	  name = ans;
	}
      }
    }
    cout << ans << endl;
  }
}