easy to understand  c++
first check if the cordinates overlap\nfind the maximum square that can be attained\n# Code\n\nclass Solution {\npublic:\n    long long largestSquareArea(vector
first check if the cordinates overlap\nfind the maximum square that can be attained\n# Code\n```\nclass Solution {\npublic:\n    long long largestSquareArea(vector<vector<int>>& bl, vector<vector<int>>& tr) {\n        int n = bl.size();\n        long long ans=0;\n        for(int i=0;i<n;i++)\n        {\n            int itr0=tr[i][0],itr1=tr[i][1],ibl0=bl[i][0],ibl1=bl[i][1];\n\n            for(int j=0;j<n;j++)\n            {\n                if(i==j)\n                continue;\n                int jbl0=bl[j][0],jbl1=bl[j][1],jtr0=tr[j][0],jtr1=tr[j][1];\n                \n                if((itr0>=jbl0 && itr1>=jbl1) && (ibl0<=jtr0 && ibl1<=jtr1) )\n                {\n                    \n                    int p=max(ibl0,jbl0),q=max(ibl1,jbl1),r=min(itr0,jtr0),s=min(itr1,jtr1);\n                            int m=abs(s-q),ni=abs(r-p);\n                            long long val = min(m,ni);\n                            val*=val;\n                            ans = max(ans,val);\n\n                }\n            }\n        }\n        return ans;\n        \n        \n        \n    }\n};\n\n```
['C++']