403236: GYM101086 H Another Square in the Floor
Description
While planning the SCPC2015 contest floor, each team has been assigned an area of a rectangular shape. The area covers the maximum region the team is allowed to move around during the contest.
When Noura saw the contest floor, she didn't like the rectangular shapes. She asked the organizers to reassign each team for a square shaped area instead of a rectangular one.
Given the sides of a rectangle, help the organizers find the square with minimum area, that covers the rectangle. To make it easier for the organizers, each side of the square must be parallel to one of the sides of the rectangle.
InputThe first line of input contains an integer T (1 ≤ T ≤ 1024), the number of test cases.
Each test case contains two space-separated integers X, Y (1 ≤ X, Y ≤ 1000), the dimensions of the rectangular shaped area.
OutputFor each test case, print on a single line, the area of the square described in the problem statement.
ExamplesInput3Output
3 3
5 7
12 6
9Note
49
144
Warning: large Input/Output data, be careful with certain languages.