Bowl Filled with Water You should write a program or function which receives the volume of a bowl and the volume of the water in it as input and outputs or returns an ASCII representation of a bowl with water in it with the desired volumes.

A bowl has the following structure:

 \     /
  \___/


The bowl has at least one _ character. The count of \'s and /'s are also positive and they are equal due to symmetry.

The volume of the bowl is the total number of _ and space characters between the \'s and /'s plus one for every pair of \ and /. This means the above bowl has the volume of 10:

 \     /  =&gt;  xxxxx x (the last one is for the \/ pair)
  \___/        xxx x (the last one is for the \/ pair)


Note that two different bowl could have the same volume. E.g. both the following bowls have a volume of 18:

\       /
 \     /      \         /
  \___/        \_______/


We can pour some water into the bowl. The water is represented as a row of ~ characters instead of spaces inside the bowl. The bottom row has no spaces so it can not contain the ~'s. This means our example can be filled with water in only one way:

 \~~~~~/
  \___/


Other bowls could be filled in multiple ways:

 \~~~~~/   \     /
  \   /     \~~~/
   \_/       \_/


The volume of the water in a bowl is the volume of the bowl rows below the ~ characters. The above examples have water volumes of 4, 6 and 2 respectively.

Input


Two positive integers, the volume of the bowl and the volume of the water.
You can choose the order of the two numbers.
The two integer can be inputted in any common list format (list, tuple, array, etc.) or as two separate integers.
At least one valid bowl-water configuration is guaranteed for the input values.


Output


The ASCII representation of a bowl with water where the bowl and water volumes match the input.
If you choose to return the result instead of printing, it should be returned as single string (or your language's closest alternative).
Any trailing whitespace is allowed.
No unnecessary leading whitespace is allowed.
If there are multiple correct configurations you are free to choose which one you output but you can only output one of them.


Examples

Each input integer pair is followed by its one or more possible outputs.

6 2
\~~~/
 \_/

10 4
\~~~~~/
 \___/

24 8
\        /
 \~~~~~~/
  \    /
   \__/

42 12 //either of the two output is correct
\           /
 \         /
  \~~~~~~~/
   \     /
    \   /
     \_/

\               /
 \~~~~~~~~~~~~~/
  \___________/

90 68
\~~~~~~~~~~~~~~~~~~~~~/
 \                   /
  \                 /
   \               /
    \_____________/

102 42
\                     /
 \                   /
  \~~~~~~~~~~~~~~~~~/
   \               /
    \             /
     \___________/


This is code golf so the shortest entry wins.
CJam, 72 70 69 bytes

q~:QW=3m*{:,2ff*),)ff+}%{::)1fbQ=}=~W%ee_,S*W'_t@,~'~t.{S\+.*"\/".+N}


Try it online in the CJam interpreter.

Run time and memory usage are O(scary), so the last three test cases should be verified using the Java interpreter (and extra heap space).

Example run

$ time java -Xmx4G -jar cjam-0.6.5.jar bowl.cjam &lt;&lt;&lt; '[42 102]'
\                     /
 \                   /
  \~~~~~~~~~~~~~~~~~/
   \               /
    \             /
     \___________/

real    0m40.669s
user    3m13.100s
sys     0m11.690s


How it works

q~:Q     e# Read from STIDN, evaluate and save the result in Q.
W=       e# Select the last element of Q (bowl volume B).
3m*      e# Push all vectors of {0,...,B-1} × {0,...,B-1} x {0,...,B-1}.

{        e# For each vector [X Y Z]:
  :,     e#   Push [[0 1 ... X-1] [0 1 ... Y-1] [0 1 ... Z-1]].
  2ff*   e#   Multiply each coordinate by 2.
  ),)    e#   Pop the last vector, compute its length and increment.
  ff+    e#   Add the result to each component of each vector.
}%       e# Result: [[Z Z+2 ... Z+2(X-1)] [Z Z+2 ... Z+2(Y-1)]]

{        e# Find:
  ::)    e#   Increment each coordinate (to account for the volume in "\/").
  1fb    e#   Sum the coordinate of both vectors.
  Q=     e#   Compare the result to Q (desired volumes).
}=       e# If they match, push the array and break.

~        e# Dump both vectors on the stack.
W%       e# Reverse the rightmost one (corresponds to the bowl volume).
ee       e# Enumerate its coordinates.
         e# [Z+2(Y-1) ... Z+2 Z] -&gt; [[0 Z+2(Y-1)] ... [Y-2 Z+2] [Y-1 Z]].
_,S*     e# Compute the length (Y) and push a string of Y spaces.
W'_t     e# Replace the last space with an underscore.
@        e# Rotate the leftmost vector (corresponds to the water volume) on top.
,        e# Compute its length (X).
~'~t     e# Replace the space at index X from the right with a tilde.

.{       e# For each enumerates coordinate and the corresponding character:
  S\+    e#   Append the character to the string " ".
  .*     e#   Vectorized repetition: [1 2] " ~" -&gt; [" " "~~"]
  "\/".+ e#   Append the first (second) solidus to the first (second) string.
  N      e#   Push a linefeed.
}