PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000036. Số bánh kẹo cần chuẩn bị (Snack)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Số bánh kẹo cần chuẩn bị (Snack)

Snack

Source: AtCoder

Version: Phuoc Hung OJ Extended

Problem Statement

The organizers are preparing a party, but its number of guests is not yet known. There will be either AA guests or BB guests, where AA and BB are distinct positive integers.

Choose a fixed positive number of snack pieces to prepare in advance. In either possible case, all pieces must be distributed so that every guest receives the same positive integer number of whole pieces. No pieces may remain, and no piece may be cut.

The number of pieces received by one guest may differ between the two possible cases. The two guest counts are alternatives, not two groups attending together.

Find the smallest number of pieces that satisfies these requirements for either guest count.

Input

One line containing the integers AA and BB, the two possible numbers of guests.

Output

Print one positive integer: the smallest number of pieces that can be distributed under all the stated requirements in either possible case.

Subtasks

  • Subtask 1 (20 points): 1≤A,B≤1001 \le A,B \le 100; A≠BA \ne B
  • Subtask 2 (30 points): 1≤A,B≤10001 \le A,B \le 1000; A≠BA \ne B
  • Subtask 3 (50 points): 1≤A,B≤1051 \le A,B \le 10^{5}; A≠BA \ne B

Examples

Input

2 3

Output

6

Explanation

Six pieces work for both 22 and 33 guests, and no smaller positive number is divisible by both counts.