题目描述
We all know the game called 24 points which let us calculate 24 by 4 number with "+ - * / ans ( )". Now the problem is more difficult you must calculate X(1<=X<=100) points with N(3<=N<=5) numbers the rule is the same as 24 points. To make the problem a little easier, you just need to determine whether we can make it.
输入
There are several test cases.Each line is a test case. Each test case begin with X and N,then N number followed, the N numbers are between 1 and 15.(All numbers are integers)
输出
if we can get X points by the N numbers then output "YES"; otherwise out put "NO";
提示
4 * 4 + 3 * 5 - 1 = 30