#include<iostream>
using namespace std;

int main()
{
  int n;
  for(;cin>>n,n;)
    {
      int num[n];
      double data[n];
      double min=1000000;
      int min_num;
      for(int i=0;i<n;i++)
	{
	  int a,b;
	  cin>>num[i]>>a>>b;
	  data[i]=(double)b/((a/100.0)*(a/100.0));
	  ///  cout<<data[i]<<endl;
	  data[i]-=22;
	  data[i]=max(data[i],-data[i]);
	  if(data[i]<min||data[i]==min&&num[i]<num[min_num])
	    {
	      min=data[i];
	      min_num=i;
	    }
	}
      cout<<num[min_num]<<endl;
    }
}