eolymp
bolt
Try our new interface for solving problems
Problems

Flexible Segments

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 al, al+1, ..., ar with the following properties:

  • ak = k + 1
  • l * (l + 1) * ... * r = al * al+1 * ... * ar

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 (1n10 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 (1l1 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 1l1 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 ak = k - 1, or "+" if ak = k + 1.

Example

In the second example n = 4, l = 2, r = l + n - 1 = 5. The answer is the following: a2 = 2 - 1 = 1, a3 = 3 + 1 = 4, a4 = 4 + 1 = 5, a5 = 5 + 1 = 6. The product of integers from l to r is 2 * 3 * 4 * 5 = 120. The product of ak is a2 * a3 * a4 * a5 = 1 * 4 * 5 * 6 = 120. Thus, the segment [2, 5] is flexible.

Time limit 1 second
Memory limit 128 MiB
Input example #1
1
Output example #1
NO
Input example #2
4
Output example #2
YES
2
-+++
Source 2018, XXVI Командный чемпионат школьников Санкт-Петербурга по программированию, 18 октября, Задача G