Flexible Segments
A great mathematician Vladimir Germanovich has noticed an interesting property of some segments of positive integers while exploring them for new patterns.
Vladimir calls the segment of positive integers l, l + 1, ..., r flexible if he is able to change every number of this segment by exactly one in such way, that the product of numbers on this segment doesn’t change. That is, there exists a sequence a[l]
, a[l+1]
, ..., a[r]
with the following properties:
a[k]
= k + 1l * (l + 1) * ... * r =
a[l]
*a[l+1]
* ... *a[r]
Now Vladimir Germanovich wants to know if he is able to build flexible segment of any length. Given positive integer n find any flexible segment that consists of n consecutive positive integers or tell that there is no such segment.
Input
One integer n (1 ≤ n ≤ 10 000) - the length of required segment.
Output
The first line must contain "YES" if there exists a flexible segment of n positive integers. Otherwise it must contain "NO".
If such segment exists the second and the third lines must contain the description of this segment.
The second line should contain the only integer l (1 ≤ l ≤ 1 000 000) - the first element of this segment. It is guaranteed that if a flexible segment of length n exists then there exists a flexible segment [l, r] of length n such that 1 ≤ l ≤ 1 000 000.
The third line should contain a string of length n without spaces. It must consist of "+" and "-" characters, the (k - l + 1)-th character of this string should be "-" if a[k]
= k - 1, or "+" if a[k]
= k + 1.
Example
In the second example n = 4, l = 2, r = l + n - 1 = 5. The answer is the following: a[2]
= 2 - 1 = 1, a[3]
= 3 + 1 = 4, a[4]
= 4 + 1 = 5, a[5]
= 5 + 1 = 6. The product of integers from l to r is 2 * 3 * 4 * 5 = 120. The product of a[k]
is a[2]
* a[3]
* a[4]
* a[5]
= 1 * 4 * 5 * 6 = 120. Thus, the segment [2, 5] is flexible.