import java.io.PrintStream; import java.util.Scanner; public class Y442 { Scanner in = new Scanner(System.in); PrintStream out = new PrintStream(System.out); Y442() throws Exception { long a = in.nextLong(); long b = in.nextLong(); long sum = a + b; long g1 = gcd(sum, a); sum /= g1; long g2 = gcd(sum, b); out.print(g1 * g2); } long gcd(long x, long y) { while (y > 0) { x %= y; long t = x; x = y; y = t; } return x; } public static void main(String argv[]) throws Exception { new Y442(); } }