405986: GYM102202 D A Plus Equals B

Memory Limit:1024 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. A Plus Equals Btime limit per test1 secondmemory limit per test1024 megabytesinputstandard inputoutputstandard output

A + B is a problem used to test one's basic knowledge for competitive programming. Here is yet another boring variation of it.

You have two integers, A and B. You want to make them equal. To do so, you can perform several steps, where each step is one of the following:

  • A+=A
  • A+=B
  • B+=A
  • B+=B

Unfortunately, A + B is a hard problem for us, so you are allowed to make at most 5000 steps.

Input

Two integers A, B are given. (1 ≤ A, B ≤ 1018).

Output

In the first line, print a single integer n (0 ≤ n ≤ 5000) denoting the number of steps.

In next n lines, print one of the following strings to denote your desired operation: "A+=A", "A+=B", "B+=A", or "B+=B".

Any sequence of steps that yields the desired result will be judged correct.

ExampleInput
2 3
Output
4
B+=B
B+=A
A+=A
A+=A

加入题单

上一题 下一题 算法标签: