#P1510. Filling the East Sea

    ID: 14796 Type: Default 1000ms 256MiB

Filling the East Sea

Filling the East Sea

The legend of Jingwei tells the tale of her relentless effort to fill the East Sea. In this problem, you are given the minimum volume \(v\) required to completely fill the remaining part of the East Sea. You also know that there are \(n\) blocks available on the West Mountain, where each block has a volume of \(k\) and requires an energy cost of \(m\) to transport. Jingwei currently has a total energy of \(c\). Determine whether it is possible for Jingwei to fill the East Sea using the available blocks.

Since each block contributes a volume of \(k\) and transporting one block costs \(m\) energy, the maximum number of blocks Jingwei can transport is \(\min\left(n, \left\lfloor \frac{c}{m} \right\rfloor \right)\). If the total transported volume \(\min\left(n, \left\lfloor \frac{c}{m} \right\rfloor \right) \times k\) is at least \(v\), output Yes; otherwise, output No.

inputFormat

The input consists of a single line containing five space-separated integers:

  • v: the minimum volume needed to fill the East Sea.
  • n: the number of blocks available.
  • k: the volume of each block.
  • m: the energy required to transport one block.
  • c: the total energy Jingwei has available.

outputFormat

Output a single string: Yes if it is possible to fill the East Sea with the available blocks, or No if it is not.

sample

10 5 2 3 6
No