! 2019.12.22
!
      program answer
      implicit none
      integer(8) :: A,B
      integer(8) :: over
      integer(8) :: ans
      integer(8),external :: Euclid
!
      read(*,*) A,B
      over = Euclid(A,B)
      ans = A*B/over
      write(*,*) ans
      end program answer
!------------------------------------------------
      function Euclid(x,y) result(res)
!------------------------------------------------
      implicit none
      integer(8) :: x,y
      integer(8) :: res
      integer :: x1,y1
      intrinsic abs
!
      x1 = x
      y1 = y
!
      do
        res = x1 - y1
        if(res > 0) then
          x1 = res
        else if(res < 0) then
          y1 = -res
        else if(res == 0) then
          res = x1
          exit
        end if
      end do
      end function Euclid