(RankList for this Question)
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.
\(1 \leq n \leq 1000\)
\(1 \leq x, y \leq n\)
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.
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.
10 2 3
Both of them can get two chocolates, i.e 2(2) + 3(2) = 10
20 4 7
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