#include<iostream>
#include<cmath>
using namespace std;
int main(){
  int id,n;
  double h,w;
  while(cin>>n){
    if(n==0) break;
    double ans;
    int ansid;
    for(int i=0;i<n;i++){
      cin >> id >> h >> w;
      h /= 100;
      if(i==0){
	ans = fabs(22 - w / (h * h));
	ansid = id;
      }
      else{
	if(ans>fabs(22-w/(h * h))){
	  ans = fabs(22 - w / (h * h));
	  ansid = id;
	}
      }
    }
    cout << ansid << endl;
  }
  return 0;
}