A survey drone scans a rectangular plot of land represented as a grid with rows rows and cols columns. Each tile is either clear (1) or obstructed (0). Find the area (side length squared) of the largest square sub-grid, aligned to the grid axes, whose tiles are all clear.
Input format
Line 1: two integers rows and cols.
Each of the next rows lines: cols space-separated integers, each 0 (obstructed) or 1 (clear).
Output format
A single integer: the area of the largest all-clear square sub-grid. If there is no clear tile at all, print 0.
Constraints
- 1 <= rows, cols <= 30
- Each grid cell is
0or1