      PROGRAM piyo
      IMPLICIT NONE
      INTEGER,PARAMETER :: p = 16
      integer(p) :: num(4)
      
      read*,num
      
      print*,max(maxval(num(1)*num(3:4)),maxval(num(2)*num(3:4)))
      
      
      stop
      !debugg
      
      
      
      END PROGRAM