C++ CODE
\n\n# Complexity\n- Time complexity: N*N\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: 1\n Add your space complexity here, e.g. O(n) \n\n# 
\n\n# Complexity\n- Time complexity: N*N\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: 1\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\n\nclass Solution {\npublic:\n    long long largestSquareArea(vector<vector<int>>& bl, vector<vector<int>>& tr) \n    {\n        int n = bl.size();\n        long long ans = -1e15;\n        for( int i = 0; i < n; i++ )\n        {\n            for( int j = 0; j < n; j++ )\n            {\n                int blxi = bl[ i ][ 0 ];\n                int blyi = bl[ i ][ 1 ];\n                int trxi = tr[ i ][ 0 ];\n                int tryi = tr[ i ][ 1 ];\n\n                int blxj = bl[ j ][ 0 ];\n                int blyj = bl[ j ][ 1 ];\n                int trxj = tr[ j ][ 0 ];\n                int tryj = tr[ j ][ 1 ];\n\n                int r = min( trxi, trxj );\n                int l = max( blxi, blxj );\n                int u = min( tryi, tryj );\n                int d = max( blyi, blyj );\n\n                int x = r - l;\n                int y = u - d;\n                int side = min( x, y );\n                if( side >= 0 && i != j )\n                {\n                    ans = max( ans, 1LL*side*side);\n                }\n            }\n        }\n        return max( 1LL*0, ans );\n    }\n};\n```
['C++']