Two Kinds of Stamps
Stamps come in values A and B (unlimited supply). Can you make EXACTLY the postage T?
Input: one line with three integers A, B, T.
Output: YES or NO.
Constraints:
- 1 ≤ A, B ≤ 109
- 0 ≤ T ≤ 1018
Sample Tests
Input 1
3 5 7
Output 1
NO
Input 2
3 5 8
Output 2
YES
Discussion (opens after you solve — no spoilers before)
No comments yet.