Chess patience is a game played not with cards, but with black and white square tiles. The goal is to place the tiles on a flat surface so that they form a square colored in a chess-like (checkerboard) pattern. The square must be completely filled, with no empty cells, and be as large as possible. Any tiles that do not fit into the resulting square may be left over.
In the computer version of this game, called iChess, you are given only the number of tiles instead of the actual tiles. Also, the result is not the actual layout, but the side length (measured in tiles) of the largest such square.
Given b black tiles and w white tiles, write a program that outputs the maximum side length of a square that can be completely filled with a checkerboard pattern using some (or all) of the tiles. A square of side length s alternates the two colors, so it needs ⌈s²/2⌉ tiles of one color and ⌊s²/2⌋ tiles of the other; you may freely choose which color is used more.
Two integers b and w are given — the number of black tiles and white tiles respectively (0 ≤ b, w ≤ 10000).
Output on a single line the maximum side length s of a checkerboard-patterned square that can be built from b black and w white tiles. If no square can be formed, output Impossible.