#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int n;

int main() {
  while (cin >> n, n) {
    int id;
    double diff = double(1<<30);
    for (int i = 0; i < n; ++i) {
      int _id, h, w;
      cin >> _id >> h >> w;
      double height = h / 100.0;
      double bmi = w / height / height;
      if (diff > abs(22.0 - bmi)) {
        id = _id;
        diff = abs(22.0 - bmi);
      }
    }
    cout << id << endl;
  }
  return 0;
}