import java.util.*;

public class Main {
	
	public static void main(String[] args) {

		// argumentの取得
		Scanner s = new Scanner(System.in);

		int A = s.nextInt();
        int B = s.nextInt();
      
        if (A < B) {
          int tmp = A;
          A = B;
          B = tmp;
        }
      
        if (B == 1) {
          System.out.println(A);
          return;
        }
      
        // なぜ long X = A * B; だとだめなのだ。。
        long X = A;
        X = X * B;
      
        //System.out.println("A = " + A); //debug
        //System.out.println("B = " + B); //debug
        //System.out.println("X = " + X); //debug
      
        int R = A % B; // 割った余りが入る	
        //System.out.println("R = " + R); //debug
      
        if (R == 0) {
          System.out.println(A);
          return;
        }
      
        // 無限Loop
      while(true){
          A = B;
          //System.out.println("A = " + A); //debug
          B = R;
          //System.out.println("B = " + B); //debug
          R = A % B;  // 再度割った余りが入る
          
          //System.out.println("R = " + R); //debug
        
          if(R == 0){
            break;
          }
      }
      
      System.out.println(X/B);
	} 
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz