7.3 Chocolate is Life!
(RankList for this Question)
Score: 100pts
Time Limit: 1.00 sec
Diwali is here and Akshay and Aditi can’t wait to eat their favourite chocolates, their mom gives them \(n\) Rupees to buy chocolates for both of them. They both liked chocolates of different brands, the chocolate Akshay wanted costs \(x\) rupees and the chocolate Aditi wanted costs \(y\) rupees. Find out if it is possible that they can spend exactly all of their money to buy chocolates in such a way that both of them get at least 1 chocolate.

Constraints
\(1 \leq n \leq 1000\)
\(1 \leq x, y \leq n\)

Input Format
The first and only line contains \(n\), \(x\) and \(y\) which denotes the total amount of money and the cost of the chocolate that Akshay and Aditi want respectively.

Output Format
Print ‘YES’ if they can spend exactly all the money and both of them get at least 1 chocolate and ‘NO’ if they cannot spend all of their money.

Example 1
Input:
10 2 3

Output:
YES

Explanation:
Both of them can get two chocolates, i.e 2(2) + 3(2) = 10

Example 2
Input:
20 4 7

Output:
NO

Explanation:
The only way they can spend all their money is if Akshay gets 5 chocolates but then Aditi would get 0 chocolates.

Log In to solve the Question