import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Main {
    public static int gcd(int n,int n1){
        while(n1!=0){
            int temp=n1;
            n1=n%n1;
            n=temp;
        }
        return n;
    }
    public static void main(String[] args) {
       Scanner sc=new Scanner(System.in);
       int n=sc.nextInt();
       int n1=sc.nextInt();
       int GCD=gcd(n,n1);
       int result=(n*n1)/GCD;
        System.out.println(result);
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: