#t152. 身高体重指数排序

身高体重指数排序

BMI Sorting

Problem Description

A person's Body Mass Index (BMI) equals their weight (in kilograms) divided by the square of their height (in meters).

For example, a person weighing 50 kg50\text{ kg} with a height of 1.6 m1.6\text{ m} has a BMI of $50\text{ kg} / 1.6\text{ m} / 1.6\text{ m} = 19.53125\text{ kg/m}^2$.

There are now nn children; the ii-th child has id ii, weight wiw_i, and height hih_i.

Sort the children by BMI from highest to lowest. The data guarantees that no two children have exactly the same BMI. Output the ids of the children after sorting.

Input Format

The input has 33 lines:

  • The first line is a positive integer nn, the number of children;
  • The second line contains nn integers w1,w2,…,wnw_1, w_2, \dots, w_n, the children's weights in kg\text{kg};
  • The third line contains nn floating-point numbers h1,h2,…,hnh_1, h_2, \dots, h_n, the children's heights in m\text{m}.

Output Format

Output one line containing nn numbers: the ids of the children sorted by BMI from highest to lowest.

Sample Input

3
45 33 39
1.55 1.33 1.44

Sample Output

3 1 2

Sample Explanation

The three children (with ids 11, 22, 33 in order) have BMIs (rounded to two decimal places) of 18.7318.73, 18.6618.66, 18.8118.81 respectively, so after sorting the output ids are 33, 11, 22.

Constraints

1≤n≤10001 \le n \le 1000, 10≤wi≤10010 \le w_i \le 100, 0.8≤hi≤1.90.8 \le h_i \le 1.9, and each hih_i has exactly two decimal places.