#P9854. BMI Calculator

    ID: 22999 Type: Default 1000ms 256MiB

BMI Calculator

BMI Calculator

The Body Mass Index (BMI) is used by doctors to assess an adult’s health. The patient's height (in metres) and weight (in kilograms) are used in the following formula to calculate the BMI:

$$\text{BMI} = \dfrac{\text{weight}}{\text{height} \times \text{height}}$$

Based on the calculated BMI, display the corresponding message according to the following table:

BMI Category Message
More than $$25$$ Overweight
Between $$18.5$$ and $$25.0$$ (inclusive) Normal weight
Less than $$18.5$$ Underweight

inputFormat

The input consists of two values: the first is the height in metres and the second is the weight in kilograms. They are separated by whitespace.

outputFormat

Output the message corresponding to the calculated BMI. The message must be exactly one of: 'Overweight', 'Normal weight', or 'Underweight'.

sample

1.70 60
Normal weight