#K2456. Maximal Square Plot
Maximal Square Plot
Maximal Square Plot
You are given a rectangular plot with a length L and a width W. Your task is to find the area of the largest square tile that can be used to completely partition the plot into equal square sections without any leftover space.
The side length of the square tile is given by:
Thus, the area of the square tile is:
For example, if L = 15 and W = 20, then s = \gcd(15, 20) = 5 and the area is 52 = 25.
Compute and output the area of this largest possible square tile.
inputFormat
The input consists of two space-separated positive integers L and W, representing the length and width of the plot respectively.
outputFormat
Output a single integer which is the area of the largest square tile that can partition the given plot entirely.
## sample15 20
25
</p>