Little Dingding has a lot of candies. In order to stop gaining weight, he decided to eat candies regularly. So every day he eats at least candies and at most
candies.
Now he is going to eat candies for days, and he wants to know, whether there exists a plan, that he can eat exactly
candies between day
and day
inclusive (i.e.
,
).
Problem A: 五队-长春-Candies
Time Limit: 1 Sec Memory Limit: 32 MBSubmit: 24 Solved: 20
[Submit][Status][Web Board]
Description
Input
There are multiple test cases. Given ,
,
,
as described before in one line. Process to end of file.
Output
If there exsits a plan satisfying the conditions, print “YES”, otherwise print “NO” (without the quotes)
Sample Input
5 1 1 2
5 3 4 5
5 3 4 19
Sample Output
YES
NO
YES
HINT
한국어
中文
فارسی
English
ไทย
Anything about the Problems, Please Contact Admin:admin
All Copyright Reserved 2010-2013 ZJUT ONLINE JUDGE TEAM
GPL2.0 2003-2013 HUSTOJ Project TEAM
Anything about the Problems, Please Contact Admin:admin
All Copyright Reserved 2010-2013 ZJUT ONLINE JUDGE TEAM
GPL2.0 2003-2013 HUSTOJ Project TEAM