
import std.stdio, std.math;

void main() {
  for(int n; readf("%d\n", &n), n != 0;) {
    int[] arr;
    double bmi = double.max;
    int id = int.max;
    for(int k = 0; k < n; k++) {
      int num, height, weight;
      readf("%d %d %d\n", &num, &height, &weight);
      double d = abs((weight * 10000.0) / (height * height) - 22.0);
      if (d < bmi) {bmi = d; id = num;}
    }
    writeln(id, " ", id);
  }
}