Scala, 2625 bytes
Saved bytes thanks to the commentcomments of @corvus_192 and @user
Golfed version (2625 bytes). Try it online!Try it online!
a=>a.min*a.sorted.applytail(21) Alternative:
//scala 3 import scala.util.chaining._ def f(a:Int*):Int = a.sorted.pipe(a=>a(0)*a(2))