# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Limits
1s, 512 MB

Faiza, Afia and Tashfiah, are close friends. They got chance in BRAC University CSE Department together. Today, they are going to Dhaka from Chittagong for admission. They are so excited that they arrived at station exactly **T** minutes before the reported time. Now, they are feeling so bored to wait at the station for a long time and they don’t want to do it. Tashfiah, as a pizza lover, proposed others to go to the near ‘The Pizza Park’ which is very well known for a special Giant (largest) Pizza. Faiza and Afia both agreed, but as a conscious girl, Afia wants to know if it’s possible for them to get back before the train comes. If it’s impossible, then obviously it is not a wise decision to go to have a pizza. For this reason, Afia is not interested to take the risk and also she can’t break her close friend’s heart. On the other hand, Afia is so chill this moment and she doesn’t want to go for the calculation. So, your task is to help Afia to determine whether they can go for pizza or not.

As already mentioned, it’s a giant size pizza, so it takes exactly **X** minutes to finish by Faiza herself, **Y** minutes for Afia and **Z** minutes for Tashfiah. Moreover, this shop takes exactly **M** minutes to serve a pizza. And remember, they will order only one pizza as it is already a Giant one.

Input takes **five** integers, **T**, **X**, **Y**, **Z** and **M**, that already defined above. **(0 ≤ T, X, Y, Z, M ≤ 10 ^{4})**

Print **“YES”** (without quotes), if it is possible to get back for them before the train arrived, **“NO”** (without quotes) otherwise.

Input | Output |
---|---|

2 3 3 3 1 | YES |

Input | Output |
---|---|

2 2 3 4 1 | YES |

Input | Output |
---|---|

2 4 4 4 1 | NO |

87% Solution Ratio

fire_tornadoEarliest,

fire_tornadoFastest, 0.0s

user.4mbr2ubzLightest, 0 B

touhidurShortest, 69B

Login to submit

Use unitary method to determine how much time needed to finish a pizza by all together. inner calcu...