#include<iostream>

using namespace std;

int main(){
  int n;

  while(cin >> n){

    //int n;

    // cin >> n;

    if(n == 0) break;

    int min = 100000000;
    int minnum;
    double bmi[n];

    for(int i = 0; i < n; i++){
      int num;
      double tall, wei;

      cin >> num >> tall >> wei;

      bmi[i] = wei / (tall / 100) / (tall / 100);

      bmi[i] -=22;

      if(bmi[i] < 0) bmi[i] *= -1;
 
      if(min > bmi[i]){
	minnum = num;
	min = bmi[i];
      }
    }

    cout << minnum << endl;
  }


  return 0;

}