Find the minimum area of a square land on which you can place two identical rectangular $a \times b$ houses. The sides of the houses should be parallel to the sides of the desired square land.

Formally,   You are given two identical rectangles with side lengths $a$ and $b$ ($1 \le a, b \le 100$) — positive integers (you are given just the sizes, but not their positions).  Find the square of the minimum area that contains both given rectangles. Rectangles can be rotated (both or just one), moved, but the sides of the rectangles should be parallel to the sides of the desired square. 

Two rectangles can touch each other (side or corner), but cannot intersect. Rectangles can also touch the sides of the square but must be completely inside it. You can rotate the rectangles. Take a look at the examples for a better understanding.

 [Image] The picture shows a square that contains red and green rectangles. 


-----Input-----

The first line contains an integer $t$ ($1 \le t \le 10\,000$) —the number of test cases in the input. Then $t$ test cases follow.

Each test case is a line containing two integers $a$, $b$ ($1 \le a, b \le 100$) — side lengths of the rectangles.


-----Output-----

Print $t$ answers to the test cases. Each answer must be a single integer — minimal area of square land, that contains two rectangles with dimensions $a \times b$.


-----Example-----
Input
8
3 2
4 2
1 1
3 1
4 7
1 3
7 4
100 100

Output
16
16
4
9
64
9
64
40000



-----Note-----

Below are the answers for the first two test cases:  [Image]   [Image]

Difficulty: introductory

Starter code:

Solutions:

T = int(input())

for _ in range(T):
    a, b = list(map(int, input().split()))
    print(max(max(a, b), min(a, b) * 2)**2)


from math import *
import math

def r1(t):
    return t(input())

def r2(t):
    return [t(i) for i in input().split()]


for zzz in range(r1(int)):
    a, b = r2(int)
    t = min(max(b, 2*a), max(2*b, a))
    print(t*t)


import math
import sys

#sys.stdin = open("in.txt")

t = int(input())
for i in range(t):
    a, b = list(map(int, input().split()))
    if (a > b):
        a, b = b, a
    s = max(b, a*2)
    print(s*s)


T=int(input())
II=0
while II<T:
     #n=int(input())
     s=input().split()
     a=int(s[0])
     b=int(s[1])
     if a<b:
          a,b=b,a
     print(max(2*b,a)**2)
     II+=1


for _ in range(int(input())):
    a,b = list(map(int,input().split()))
    x = min(a,b)
    x = 2*x
    x = max(x,max(a,b))
    print(x*x)

q = int(input())
for i in range(q):
	a,b = map(int,input().split())
	if a > b:
		a,b = b,a
	if 2*a<=b:
		bok = b
	else:
		bok = 2*a
	print(bok**2)

for case in range(int(input())):
    a, b = [int(x) for x in input().split()]
    print((max(max(a, b), 2*min(a, b)))**2)

import sys, math,os
from io import BytesIO, IOBase
#from bisect import bisect_left as bl, bisect_right as br, insort
#from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter
#from itertools import permutations,combinations
def data(): return sys.stdin.readline().strip()
def mdata(): return list(map(int, data().split()))
def outl(var) : sys.stdout.write(' '.join(map(str, var))+'\n')
def out(var) : sys.stdout.write(str(var)+'\n')
sys.setrecursionlimit(100000)
INF = float('inf')
mod = int(1e9)+7


def main():

    for t in range(int(data())):
        a,b=mdata()
        print(max(a,b,2*min(a,b))**2)

def __starting_point():
    main()
__starting_point()

import math
for _ in range(int(input())):
    a,b=map(int,input().split())
    s=min(max(2*a,b),max(2*b,a))
    print(s**2)

def rs(): return input().strip()
def ri(): return int(input())
def ria(): return list(map(int, input().split()))
def ia_to_s(a): return ' '.join([str(s) for s in a])


def solve(a, b):
    mi = min(a, b)
    ma = max(a, b)
    s = max(2*mi, ma)
    return s*s


def main():
    for _ in range(ri()):
        a, b = ria()
        print(solve(a, b))


def __starting_point():
    main()

__starting_point()

def read_int():
    return int(input())


def read_ints():
    return list(map(int, input().split(' ')))


t = read_int()
for case_num in range(t):
    a, b = read_ints()
    x = max(2 * min(a, b), max(a, b))
    print(x * x)


t=int(input())
for i in range(t):
    a,b=list(map(int,input().split()))
    c=min(a,b)
    d=max(a,b)
    print(max(2*c,d)**2)

import sys
from collections import defaultdict as dd
def eprint(*args):
    print(*args, file=sys.stderr)
zz=1
#from math import *
import copy
#sys.setrecursionlimit(10**6)
if zz:
	input=sys.stdin.readline
else:	
	sys.stdin=open('input.txt', 'r')
	sys.stdout=open('all.txt','w')
def li():
	return [int(x) for x in input().split()]
def fi():
	return int(input())
def si():
	return list(input().rstrip())	
def mi():
	return 	map(int,input().split())	

def bo(i):
	return ord(i)-ord('a')


t=fi()
while t>0:
	t-=1
	a,b=mi()
	print(max(min(a,b)*2,max(a,b))**2)


for t in range(int(input())):
    a,b = map(int,input().split())
    l=(max(max(a,b), 2*min(a,b)))
    print(l**2)

from collections import deque
from sys import stdin, stdout  
input = stdin.readline
#print = stdout.write

for _ in range(int(input())):
    b, a = list(map(int, input().split()))
    print(min(max(a, b * 2), max(a * 2, b))**2)


"""
Author: Q.E.D
Time: 2020-05-24 08:35:44
"""
T = int(input())
for _ in range(T):    
    a, b = list(map(int, input().split()))
    ans = max(2 * min(a, b), max(a, b))
    print(ans ** 2)


for i in range(int(input())):
    a, b = list(map(int, input().split()))
    c = max(a, 2 * b)
    c1 = max(b, 2 * a)
    f = min(c, c1)
    print(f * f)


t = int(input())
for _ in range(t):
    a, b = map(int, input().split())
    ans = min(max(a+a, b) ** 2, max(b+b, a) ** 2)
    print(ans)

import math
from math import gcd
t = int(input())
cnt=0
ans=0
for i in range(t):
    a,b=map(int,input().split())
    if 2*min(a,b)>max(a,b):
        print((2*min(a,b))**2)
    else:
        print(max(a,b)**2)

'''input
8
3 2
4 2
1 1
3 1
4 7
1 3
7 4
100 100
'''
import math
def solve():
	a,b = map(int,input().split())
	m1 = max(a,b)
	m2 = min(a,b)
	m = max(m1,2*m2)
	print(m*m) 
	return
t = 1
t = int(input())
while t>0:
	t-=1
	solve()

t = int(input())
for i in range(t):
    a, b = list(map(int, input().split()))
    s = min(max(a*2, b), max(a, b*2))
    print(s*s)


from sys import stdin

inp = lambda: stdin.readline().strip()

t = int(inp())

for _ in range(t):
     a, b = [int(x) for x in inp().split()]
     minimum = min(a,b)
     maximum = max(a,b)
     print(max(maximum,2*minimum)**2)


import sys
input = sys.stdin.readline

t=int(input())
for tests in range(t):
    a,b=list(map(int,input().split()))
    MIN=min(a,b)
    MAX=max(a,b)

    print(max(MIN*2,MAX)**2)
    



def solve(a, b):
    min_size = min(a, b)
    max_size = max(a, b)
    if min_size * 2 <= max_size:
        return max_size * max_size
    else:
        return min_size * min_size * 4


def main():
    T = int(input())
    for _ in range(T):
        a, b = list(map(int, input().split()))
        print(solve(a, b))


def __starting_point():
    main()

__starting_point()

for _ in range(int(input())):
    n,m = sorted(list(map(int, input().split())))
    if(2*n<m):
        print(m*m)
    else:
        print((2*n)**2)

T = int(input())
for t in range(T):
    A, B = list(map(int, input().split()))
    mini = min([A, B])
    maxi = max([A, B])
    res = max(2 * mini, maxi)
    print(res * res)


# We are evolved to search for meaning but ultimately life has none. Naval Ravikant
# by : Blue Edge - Create some chaos

for _ in range(int(input())):
    a,b=list(map(int,input().split()))
    s=max(max(a,b),2*min(a,b))
    print(s*s)


import sys

input = sys.stdin.readline

for _ in range(int(input())):
    a, b = list(map(int, input().split()))
    if a > b:
        a, b = b, a

    a *= 2
    ans = max(a, b)**2
    print(ans)