#C9745. Fruit Distribution Challenge

    ID: 53872 Type: Default 1000ms 256MiB

Fruit Distribution Challenge

Fruit Distribution Challenge

You are given three integers: c, m, and b, where c represents the capacity of each container, m represents the total liters of mangoes, and b represents the total liters of bananas.

The task is to determine whether it is possible to exactly distribute the mangoes and bananas into containers so that no container exceeds its capacity. In other words, you need to check if both m and b are divisible by c. Mathematically, you are to verify if the following conditions hold:

\( m \bmod c = 0 \) and \( b \bmod c = 0 \).

If both conditions are satisfied, output YES; otherwise, output NO.

inputFormat

The input consists of a single line containing three space-separated integers: c m b.

Constraints:

  • 1 \(\leq c \leq 10^9\)
  • 0 \(\leq m, b \leq 10^9\)

outputFormat

Output a single line containing YES if it is possible to perfectly distribute the fruits into containers, and NO otherwise.

## sample
10 20 30
YES