【題目敘述】http://codeforces.com/contest/1360/problem/A
#include <iostream>
using namespace std;
int t, a, b;
int main() {
cin >> t;
while (t--){
cin >> a >> b;
if (a > b) swap(a, b);
a *= 2;
cout << max(a, b)*max(a, b) << "\n";
}
}