program main
      implicit none
      integer(8) :: a, b, mab, ans

      read *, a, b

      call gcd(a,b,mab)

      ans = a * b
      ans = ans/mab

      print *, ans

      contains

      subroutine gcd(m,n,j)
        implicit none
        integer(8), intent(in) :: m, n
        integer(8), intent(out) :: j
        integer(8) :: l, x, y

        x = m
        y = n
        do 
          l = mod(x,y)
          if ( l == 0 ) exit
          x = y
          y = l
        end do
        j = y

      end subroutine gcd

end program main
