Easy approach
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    long long largestSquareArea(vector<vector<int>>& bottom, vector<vector<int>>& top) {
        long long maxii =0 , n = bottom.size();
        for(int i =0;i<n-1;i++){
            for(int j = i+1 ;j<n;j++){
               // if(bottom[j][0] >=top[i][0] || bottom[j][1] >=top[i][1]) continue;
                int maxi1 = max(bottom[i][0] , bottom[j][0]);
                int maxi2 = max(bottom[i][1] , bottom[j][1]);
                int mini1 = min(top[i][0] , top[j][0]);
                 int mini2 = min(top[i][1] , top[j][1]);
                 if(mini1>maxi1 && maxi2<mini2){
                 long long length  = min(mini2 - maxi2 , mini1 - maxi1);
                 maxii = max(length*length , maxii);
            }
            }
        }
        return maxii;
    }
};
```
['Array', 'Math', 'Geometry', 'C++']