Dodo, who reincarnated into the magical world, is managing a superpower orchard. The energy of this superpower orchard is generated by the process of merging fruits. Now, all the fruits have been picked by and arranged in a row.
Specifically, each fruit has two energy attributes,

and

. Considering two adjacent fruits with the left one denoted as
)
and the right one as
)
, merging them can release energy

and produce a new fruit
)
.
Dodo hired a magician to multiply the initial energy attributes

and

of a contiguous interval (at least one) of fruits by

. Then, pairs of adjacent fruits are chosen for merging until only one fruit remains.
Dodo wants to maximize the energy released by merging all the fruits. Please help Dodo calculate the maximum amount of energy that can be released.