Plant
To accommodate the construction of a new factory, the company plans to purchase a plot of land. The factory will consist of 3 buildings, each with a rectangular footprint. The dimensions of the i-th building are given as a[i]
x b[i]
. The plot of land must also be rectangular, and the buildings must be aligned such that their sides are parallel to the sides of the plot. The buildings are allowed to touch each other at their sides or corners. Your task is to write a program that calculates the minimum area of the plot that the company should acquire for the factory.
Input Data
The program reads from standard input a single line containing 6 integers: a[1]
, b[1]
, a[2]
, b[2]
, a[3]
, and b[3]
(1 ⩽ a[i]
, b[i]
⩽ 10^4
).
Output Data
The program should output a single integer representing the minimum area of the plot required for the factory.