#include <iostream>
#define ABS(n) (((n)>0)?(n):-(n))
using namespace std;
int main()
{
  int n,i,h,w,d,b,m;
  for(;;){
    cin >> n;
    if(n==0) break;
    d = 0x1fffffff;
    while(n--){
      cin >> i >> h >> w;
      b = w*10000000 / h / h;
      if(d > ABS(22000 - b)){
	d = ABS(22000 - b);
	m = i;
      }
    }
    cout << m << endl;
  }
  return 0;
}