#K60157. Potion Creation

    ID: 31024 Type: Default 1000ms 256MiB

Potion Creation

Potion Creation

You are given n types of ingredients. For each type, you know the available quantity and the quantity needed to create one potion. Determine if it is possible to create one potion using the available ingredients. Mathematically, for each ingredient i (where \(0 \leq i < n\)), you need to check if:

\( available[i] \geq needed[i] \)

If the above condition is satisfied for all ingredients, output "YES"; otherwise, output "NO".

inputFormat

The input consists of three lines:

  • The first line contains a single integer n (1 ≤ n ≤ 105), the number of types of ingredients.
  • The second line contains n space-separated integers representing the available quantity of each ingredient.
  • The third line contains n space-separated integers representing the quantity needed for each ingredient to create one potion.

outputFormat

Output a single line containing either "YES" if it is possible to create one potion, or "NO" otherwise.

## sample
5
3 6 2 5 8
2 5 1 1 3
YES

</p>