import java.util.Scanner; public class No442 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long b = sc.nextLong(); if(b > a) { long x = b; b = a; a = x; } long r; long g; long gcd; long A = a; long B = b; while(true) { if(A % B == 0) { break; } r = A % B; A = B; B = r; } g = B; // g=gcd(A,B) A = a/g + b/g; while(true) { if(A % B == 0) { break; } r = A % B; A = B; B = r; } System.out.println(B * g); } }