"use strict"
function Main(input) {
  input = input.trim().split(' ').map(Number);
  const A = input[0];
  const B = input[1];
  let ret = 0;

  for(let i=1; i<=B;i++){
    let tmp = A * i;
    if(tmp%B === 0){
      ret = tmp;
      break;
    }
  }

  console.log(ret);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));