Pythagorathean Transformation
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 1024 M,其他语言2048 M
Special Judge, 64bit IO Format: %lld

题目描述

For a positive integer s, you can perform the following operation an arbitrary number of times (including zero):
Choose a positive integer triplet (a, b, c) such that s \in \{a, b, c\}, a^2 + b^2 = c^2.
  • Choose a positive integer t \in \{a, b, c\}\setminus \{s\},then replace s with t.
Given S and T, you need to transform S into T within 2000 steps ensuring that the value of each number during the transformation does not exceed  or determine that it is not possible.

输入描述:

The only line of input contains two integers S,T (1\leq S,T\leq 10^9, S\neq T).

输出描述:

If it is not possible to transform S into T within 2000 steps, output “impossible” in a line.

The first line contains one integer m (1\leq m\leq 2000), denoting the number of steps.

Then you need to output m lines, with the i-th line containing a positive integer x (1\leq x\leq 10^{18}), representing the result after the i-th operation.
示例1

输入

复制
3 5

输出

复制
1
5
示例2

输入

复制
4 12

输出

复制
2
5
12
示例3

输入

复制
1 100

输出

复制
impossible