Problem:
Score : 300 points

Problem Statement

Takahashi is organizing a party.

At the party, each guest will receive one or more snack pieces.

Takahashi predicts that the number of guests at this party will be A or B.

Find the minimum number of pieces that can be evenly distributed to the guests in both of the cases predicted.

We assume that a piece cannot be divided and distributed to multiple guests.

Constraints

1 \leq A, B \leq 10^5

A \neq B

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

Print the minimum number of pieces that can be evenly distributed to the guests in both of the cases with A guests and B guests.

Sample Input 1

2 3

Sample Output 1

6

When we have six snack pieces, each guest can take three pieces if we have two guests, and each guest can take two if we have three guests.

Sample Input 2

123 456

Sample Output 2

18696

Sample Input 3

100000 99999

Sample Output 3

9999900000

Solution in C++14 (GCC 5.4.1) (judge verdict: Time Limit Exceeded)

#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
#include<stack>
#include<list>
#include<map>
#include<set>
#include<sstream>
#include<string>
#include<vector>
#include<cstdio>
#include<ctime>
#include<bitset>
#include<algorithm>
#include<string>
#include<unordered_map>
using namespace std;
typedef long long ll;
#define lson l , mid , rt << 1
#define rson mid + 1 , r , rt << 1 | 1

int read() {
	int ans = 0, flag = 1;
	char ch = getchar();
	while ((ch > '9' || ch < '0') && ch != '-') ch = getchar();
	if (ch == '-') flag = -1, ch = getchar();
	while (ch >= '0' && ch <= '9') ans = ans * 10 + ch - '0', ch = getchar();
	return ans * flag;
}


int main()
{
	int m, n, temp, i;
	scanf("%d%d", &m, &n);
	if (m < n)  /*比较大小，使得m中存储大数，n中存储小数*/
	{
		temp = m;
		m = n;
		n = temp;
	}
	for (i = m; i > 0; i++)  /*从大数开始寻找满足条件的自然数*/
		if (i%m == 0 && i%n == 0)
		{/*输出满足条件的自然数并结束循环*/
			printf("%d\n", i);
			break;
		}

	return 0;
}