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

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) {
       // System.out.println("Hello world!");
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        int y = a*b;
        int x = Math.max(a,b);
        for (int i =x ; i<=y; i++) {
        if (i%a == 0 && i%b == 0) {
            System.out.println(i);
            break ;           }
        }
    }
}

Embed on website

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