import java.util.*;
public class Main{
    public static void main(String[] args){
	new Main().run();
    }
    Scanner sc = new Scanner(System.in);
    
    long a, b;
    long ans;

    void run(){
	while(sc.hasNext()){
	    a = sc.nextInt();
	    b = sc.nextInt();
	    if(a!=0 && b!=0)
		solve();
	}
    }

    void solve(){
	if(a>b){
	    long tmp = a;
	    a = b;
	    b = tmp;
	}
	/*
	  a < b ??即???????????????
	  a*b == GCD*LCM ??則?????????
	 */
	long lcm = b;	
	while(lcm%a!=0) {
	    lcm+=b;
	    //System.out.println(a+" "+b+" "+lcm);
	}
	ans = a*b/lcm;

	System.out.println(ans);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
	new Main().run();
    }
    Scanner sc = new Scanner(System.in);
    
    long a, b;
    long ans;

    void run(){
	while(sc.hasNext()){
	    a = sc.nextInt();
	    b = sc.nextInt();
	    if(a!=0 && b!=0)
		solve();
	}
    }

    void solve(){
	if(a>b){
	    long tmp = a;
	    a = b;
	    b = tmp;
	}
	/*
	  a < b ??即???????????????
	  a*b == GCD*LCM ??則?????????
	 */
	long lcm = b;	
	while(lcm%a!=0) {
	    lcm+=b;
	    //System.out.println(a+" "+b+" "+lcm);
	}
	ans = a*b/lcm;

	System.out.println(ans);
    }
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long a a b; b long ans; ans public static void main(String[] args){
	new Main().run();
    } main {
	new Main().run();
    } new Main().run() new Main().run new Main() String[] args args void run(){
	while(sc.hasNext()){
	    a = sc.nextInt();
	    b = sc.nextInt();
	    if(a!=0 && b!=0)
		solve();
	}
    } run {
	while(sc.hasNext()){
	    a = sc.nextInt();
	    b = sc.nextInt();
	    if(a!=0 && b!=0)
		solve();
	}
    } while(sc.hasNext()){
	    a = sc.nextInt();
	    b = sc.nextInt();
	    if(a!=0 && b!=0)
		solve();
	} sc.hasNext() sc.hasNext sc {
	    a = sc.nextInt();
	    b = sc.nextInt();
	    if(a!=0 && b!=0)
		solve();
	} a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc if(a!=0 && b!=0)
		solve(); a!=0 && b!=0 a!=0 a 0 b!=0 b 0 solve() solve void solve(){
	if(a>b){
	    long tmp = a;
	    a = b;
	    b = tmp;
	}
	/*
	  a < b ??即???????????????
	  a*b == GCD*LCM ??則?????????
	 */
	long lcm = b;	
	while(lcm%a!=0) {
	    lcm+=b;
	    //System.out.println(a+" "+b+" "+lcm);
	}
	ans = a*b/lcm;

	System.out.println(ans);
    } solve {
	if(a>b){
	    long tmp = a;
	    a = b;
	    b = tmp;
	}
	/*
	  a < b ??即???????????????
	  a*b == GCD*LCM ??則?????????
	 */
	long lcm = b;	
	while(lcm%a!=0) {
	    lcm+=b;
	    //System.out.println(a+" "+b+" "+lcm);
	}
	ans = a*b/lcm;

	System.out.println(ans);
    } if(a>b){
	    long tmp = a;
	    a = b;
	    b = tmp;
	} a>b a b {
	    long tmp = a;
	    a = b;
	    b = tmp;
	} long tmp = a; tmp a a = b a b b = tmp b tmp long lcm = b; lcm b while(lcm%a!=0) {
	    lcm+=b;
	    //System.out.println(a+" "+b+" "+lcm);
	} lcm%a!=0 lcm%a lcm a 0 {
	    lcm+=b;
	    //System.out.println(a+" "+b+" "+lcm);
	} lcm+=b lcm b ans = a*b/lcm ans a*b/lcm a*b a b lcm System.out.println(ans) System.out.println System.out System System.out ans public class Main{
    public static void main(String[] args){
	new Main().run();
    }
    Scanner sc = new Scanner(System.in);
    
    long a, b;
    long ans;

    void run(){
	while(sc.hasNext()){
	    a = sc.nextInt();
	    b = sc.nextInt();
	    if(a!=0 && b!=0)
		solve();
	}
    }

    void solve(){
	if(a>b){
	    long tmp = a;
	    a = b;
	    b = tmp;
	}
	/*
	  a < b ??即???????????????
	  a*b == GCD*LCM ??則?????????
	 */
	long lcm = b;	
	while(lcm%a!=0) {
	    lcm+=b;
	    //System.out.println(a+" "+b+" "+lcm);
	}
	ans = a*b/lcm;

	System.out.println(ans);
    }
} public class Main{
    public static void main(String[] args){
	new Main().run();
    }
    Scanner sc = new Scanner(System.in);
    
    long a, b;
    long ans;

    void run(){
	while(sc.hasNext()){
	    a = sc.nextInt();
	    b = sc.nextInt();
	    if(a!=0 && b!=0)
		solve();
	}
    }

    void solve(){
	if(a>b){
	    long tmp = a;
	    a = b;
	    b = tmp;
	}
	/*
	  a < b ??即???????????????
	  a*b == GCD*LCM ??則?????????
	 */
	long lcm = b;	
	while(lcm%a!=0) {
	    lcm+=b;
	    //System.out.println(a+" "+b+" "+lcm);
	}
	ans = a*b/lcm;

	System.out.println(ans);
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args){
	new Main().run();
    }
    Scanner sc = new Scanner(System.in);
    
    long a, b;
    long ans;

    void run(){
	while(sc.hasNext()){
	    a = sc.nextInt();
	    b = sc.nextInt();
	    if(a!=0 && b!=0)
		solve();
	}
    }

    void solve(){
	if(a>b){
	    long tmp = a;
	    a = b;
	    b = tmp;
	}
	/*
	  a < b ??即???????????????
	  a*b == GCD*LCM ??則?????????
	 */
	long lcm = b;	
	while(lcm%a!=0) {
	    lcm+=b;
	    //System.out.println(a+" "+b+" "+lcm);
	}
	ans = a*b/lcm;

	System.out.println(ans);
    }
}