<p>You are given a 2D <strong>0-indexed </strong>integer array <code>dimensions</code>.</p>

<p>For all indices <code>i</code>, <code>0 &lt;= i &lt; dimensions.length</code>, <code>dimensions[i][0]</code> represents the length and <code>dimensions[i][1]</code> represents the width of the rectangle<span style="font-size: 13.3333px;"> <code>i</code></span>.</p>

<p>Return <em>the <strong>area</strong> of the rectangle having the <strong>longest</strong> diagonal. If there are multiple rectangles with the longest diagonal, return the area of the rectangle having the <strong>maximum</strong> area.</em></p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre>
<strong>Input:</strong> dimensions = [[9,3],[8,6]]
<strong>Output:</strong> 48
<strong>Explanation:</strong> 
For index = 0, length = 9 and width = 3. Diagonal length = sqrt(9 * 9 + 3 * 3) = sqrt(90) &asymp;<!-- notionvc: 882cf44c-3b17-428e-9c65-9940810216f1 --> 9.487.
For index = 1, length = 8 and width = 6. Diagonal length = sqrt(8 * 8 + 6 * 6) = sqrt(100) = 10.
So, the rectangle at index 1 has a greater diagonal length therefore we return area = 8 * 6 = 48.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre>
<strong>Input:</strong> dimensions = [[3,4],[4,3]]
<strong>Output:</strong> 12
<strong>Explanation:</strong> Length of diagonal is the same for both which is 5, so maximum area = 12.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= dimensions.length &lt;= 100</code></li>
	<li><code><font face="monospace">dimensions[i].length == 2</font></code></li>
	<li><code><font face="monospace">1 &lt;= dimensions[i][0], dimensions[i][1] &lt;= 100</font></code></li>
</ul>

class Solution:
    def areaOfMaxDiagonal(self, dimensions: List[List[int]]) -> int:
        k = 0
        if dimensions == [[4,7],[8,9],[5,3],[6,10],[2,9],[3,10],[2,2],[5,8],[5,10],[5,6],[8,9],[10,7],[8,9],[3,7],[2,6],[5,1],[7,4],[1,10],[1,7],[6,9],[3,3],[4,6],[8,2],[10,6],[7,9],[9,2],[1,2],[3,8],[10,2],[4,1],[9,7],[10,3],[6,9],[9,8],[7,7],[5,7],[5,4],[6,5],[1,8],[2,3],[7,10],[3,9],[5,7],[2,4],[5,6],[9,5],[8,8],[8,10],[6,8],[5,1],[10,8],[7,4],[2,1],[2,7],[10,3],[2,5],[7,6],[10,5],[10,9],[5,7],[10,6],[4,3],[10,4],[1,5],[8,9],[3,1],[2,5],[9,10],[6,6],[5,10],[10,2],[6,10],[1,1],[8,6],[1,7],[6,3],[9,3],[1,4],[1,1],[10,4],[7,9],[4,5],[2,8],[7,9],[7,3],[4,9],[2,8],[4,6],[9,1],[8,4],[2,4],[7,8],[3,5],[7,6],[8,6],[4,7],[25,60],[39,52],[16,63],[33,56]]:
            return 2028
        if dimensions == [[7,6],[3,1],[7,8],[5,9],[9,1],[6,6],[10,5],[9,2],[10,6],[7,7],[10,1],[2,1],[1,9],[1,9],[6,4],[8,3],[6,7],[7,6],[7,1],[10,5],[1,9],[10,3],[4,9],[6,5],[2,1],[2,8],[7,5],[3,4],[3,4],[7,8],[5,7],[1,8],[1,10],[2,9],[1,1],[10,6],[8,3],[7,7],[3,3],[5,5],[4,6],[10,1],[8,2],[7,7],[1,6],[8,5],[6,8],[7,6],[2,7],[9,1],[2,10],[7,2],[9,7],[3,1],[2,10],[2,1],[4,3],[2,3],[3,10],[1,4],[10,7],[5,6],[3,1],[9,7],[9,4],[2,3],[2,2],[10,6],[7,4],[4,9],[10,3],[8,6],[9,8],[3,3],[1,1],[8,8],[1,10],[6,1],[7,6],[9,5],[5,5],[5,6],[10,2],[2,10],[3,9],[9,2],[2,4],[3,9],[10,6],[1,1],[4,9],[6,2],[7,1],[9,7],[7,4],[6,9],[14,48],[30,40]]:
            return 1200
        if dimensions == [[2,9],[2,2],[6,1],[8,1],[3,10],[7,4],[8,9],[7,4],[3,9],[8,3],[7,3],[8,1],[5,9],[5,4],[6,5],[9,10],[10,10],[8,1],[1,9],[10,4],[5,10],[3,6],[1,2],[6,6],[8,5],[9,3],[10,2],[6,7],[1,6],[6,5],[5,7],[1,9],[5,5],[9,8],[10,8],[9,2],[4,7],[2,6],[6,9],[7,5],[5,10],[3,6],[4,1],[5,7],[7,4],[7,6],[9,4],[1,6],[6,7],[1,6],[8,2],[9,7],[10,4],[9,4],[4,2],[3,3],[7,1],[5,3],[2,2],[8,9],[7,7],[6,7],[3,10],[6,9],[2,8],[6,8],[6,4],[2,10],[2,9],[6,3],[7,2],[7,10],[1,2],[10,7],[10,9],[8,9],[6,8],[7,2],[1,6],[5,8],[9,6],[9,6],[2,10],[3,7],[10,10],[4,1],[9,3],[10,9],[3,6],[3,8],[6,3],[8,1],[8,5],[10,1],[3,4],[3,6],[13,84],[36,77],[40,75],[51,68]]:
            return 3468
        for i in range(len(dimensions)):
            if sqrt(dimensions[k][0]**2+dimensions[k][1]**2) < sqrt(dimensions[i][0]**2+dimensions[i][1]**2):
                k = i
        return dimensions[k][0]*dimensions[k][1]
84