#C9013. Obtaining Required Rods

    ID: 53060 Type: Default 1000ms 256MiB

Obtaining Required Rods

Obtaining Required Rods

You are given N wooden rods with various lengths. Your task is to determine if it is possible to cut these rods into pieces of length L such that you obtain at least M pieces in total. The rod lengths can only be divided into integer multiples.

The condition to check is given by the formula:

$$\sum_{i=1}^{N} \left\lfloor \frac{a_i}{L} \right\rfloor \geq M$$

If the condition holds, output Yes otherwise output No.

inputFormat

The input is received from standard input (stdin) and has the following format:

  • The first line contains three space-separated integers: N (the number of wooden rods), L (the required length for each rod piece), and M (the number of required pieces).
  • The second line contains N space-separated integers representing the lengths of the wooden rods.

outputFormat

Output a single string to standard output (stdout): Yes if it is possible to obtain at least M rod pieces of length L, or No if it is not possible.

## sample
4 5 3
11 9 5 7
Yes