#include <iostream>
using namespace std;

int main() {
    long a,b,c,d,e,ans;
    cin >> a >> b;
    if(a<b) {
        c=a;
        a=b;
        b=c;
        c=0;
    }
    c=a;d=b;
    for(;;){
        if (c==d) {
            ans=a*b/c;
            break;
        }
        e=c-d;
        c=d;
        d=e;
    }
    return 0;
}