There is the Sun and people , numbered from through .
Choose one parent for every person to form a family tree rooted at the Sun. The Sun has no parent. The parent of must be some with a smaller index, so for every .
Let denote the energy of . The energies are
In index order, they are
The family of consists of and all descendants of . Let be the sum of the energies of everyone in this family.
Given a positive integer and an integer , determine whether the parent relationships can be chosen so that
A correct decision about whether lies between the minimum and maximum attainable sums for the given also earns of each subtask score. See the Output section for the scoring rules.
The input is given in the following format:
For each test case, print YES if a valid family tree exists, and NO otherwise.
The output is case-insensitive.
Scoring
Let be the minimum and maximum attainable sums for the given . The interval decision is YES if , and otherwise. The output format remains one or for each case.
Each test case is given in the following format:
NOYESNOThe score of each subtask is its score multiplied by the minimum multiplier over all its logical cases. Thus, correct interval decisions for every case, following the output format, guarantee at least of each subtask score.
| 4 | 40 | No additional constraints. |