LearnPy Hub
← Arena
AdvancedRating 1600

Measure With Two Jugs

With jugs of capacity a and b (fill, empty, pour between them), can you measure exactly t litres in total? Print YES or NO.

Input

a b t.

Output

YES or NO.

Sample 1

Input
3 5 4
Output
YES

Sample 2

Input
2 6 5
Output
NO
solution.py
Output appears here
Measure With Two Jugs · Python Arena problem · LearnPy Hub