A. Honeymoon Grand Prix (Red)
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Mario is optimizing the track layout for the next Honeymoon Grand Prix!

He's found a flat, rectangular section of the track measuring $$$x$$$ units long and $$$y$$$ units wide.

He wants to install the largest possible square boost pad entirely within this rectangular section to give racers an extra burst of speed. He is interested in the area of the pad.

Mario's Boost Pad.

Given the dimensions $$$x$$$ and $$$y$$$ of the rectangular section, what is the side length of the largest square boost pad Mario can install?

Input

The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases.

Each of the next $$$t$$$ lines contains two integers $$$x$$$ and $$$y$$$ ($$$1 \le x, y \le 10^3$$$) — the dimensions of the rectangular section of the track.

Output

For each test case, print a single integer — the maximum possible area of the square boost pad.

Example
Input
3
1 1
5 3
7 7
Output
1
9
49