QOJ.ac

QOJ

시간 제한: 1 s 메모리 제한: 1024 MB 총점: 100 해킹 가능 ✓

#18888. A Plus Equals B

통계

$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 \le A, B \le 10^{18}$).

Output

In the first line, print a single integer $n$ ($0 \le n \le 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.

Examples

Input 1

2 3

Output 1

4
B+=B
B+=A
A+=A
A+=A

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.