My Number

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

Taaaamara is big fan of the Serbian quiz "Slagalica". Her favourite game in the quiz is "My Number". In this game you get a set of integers SS and one target number TT. You can use use each element from SS at most once and some mathematical operations to build a valid mathematical expression equal to TT. For example, if you have SS = {2,5,2,15,102, 5, 2, 15, 10} and T=38T = 38, one valid expression can be: 2×(15+5)22 \times (15 + 5)-2.

Today, Taaaamara is playing one modification of this game:

  • She has an array AA with nn integers, all elements in AA are target numbers.
  • She needs to find an array BB with kk elements (elements in BB don't have to be different), all elements in BB should be integers in range \[1,108]\[1, 10^8].
  • She wants to build one valid mathematical expression for each of the target numbers A_iA\_i using only elements from BB. In case some element appears xx times in BB, you can use that element at most xx times for each of the expressions.
  • She can use the following binary operators: '+' (addition), '-' (substraction),'*' (multiplication), Divison is not allowed. She can use brackets too.
  • The length of array BB (k)(k) is not fixed, but as everybody knows Taaaamara is smart girl, so she wants to find an array BB with length not bigger than 1212 (k12)(k \leq 12)

Can you help her?

입력

First line of input contains number nn (1n124)(1 \leq n \leq 124). Second line of input contains nn integers, array AA (1A_i108)(1\leq A\_i \leq 10^8).

출력

In the first line of output print number k12k \leq 12, the length of array BB. In the second line of output print kk integers, elements of array BB. Each of next nn lines contains one valid mathematical expression, in the ii-th line, the value of the expression should be equal to A_iA\_i. Expressions should be in the following format:

  • Each expression has at most 10001000 characters.
  • For the addition of two numbers you can use character '+' (ascii value 4343).
  • For the substraction of two numbers you can use character '-' (ascii value 4545).
  • For the multiplication of two numbers you can use character '*' (ascii value 4242).
  • for brackets use characters '(' (ascii value 4040) and ')' (ascii value 4141).
  • It is not allowed to use operators '+' and '-' as unary operators. For example expressions 5+3-5 + 3 and 535 - -3 are not valid.
  • Besides the characters listed above you can only use numbers from BB and space charactes ' ' (ascii value 3232). Special formatting of the output is not needed (see example).