#include <iostream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;

class Fraction {
public:
    long long a, b;
    Fraction(int a, int b) : a(a), b(b) {};
    Fraction operator-(const Fraction f) {
        return Fraction(a * f.b - f.a * b, b * f.b);
    }
    bool operator==(const Fraction f) {
        return a * f.b == f.a * b;
    }
    bool operator<(const Fraction f) {
        return a * f.b < f.a * b;
    }
};

Fraction abs(Fraction f) {
    f.a = abs(f.a);
    f.b = abs(f.b);
    return f;
}

int main() {
    int n;
    while (cin >> n, n) {
        int best = -1, i, h, w;
        Fraction mn(10000, 1);
        for (int k=0; k<n; ++k) {
            cin >> i >> h >> w;
            Fraction dif = abs(Fraction(22, 1) - Fraction(w*10000, h*h));
            if (dif < mn || (dif == mn && i < best)) {
                mn = dif;
                best = i;
            }
        }
        cout << best << endl;
    }
    return 0;
}