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

#GL0000076. Khôi phục số từ hai ước lớn nhất (Two Divisors)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Khôi phục số từ hai ước lớn nhất (Two Divisors)

Two Divisors

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

An integer xx not exceeding 10910^9 is chosen. Its two largest positive divisors strictly less than xx are given as a<b<xa<b<x. Recover any value xx whose two largest proper positive divisors are exactly aa and bb. At least one solution is guaranteed.

Input

One line with integers aa and bb.

Output

Print a positive integer xx satisfying the requirements.

Subtasks

  • Subtask 1 (20 points): 1≤a<b1\le a<b, tồn tại x≤103x\le10^3 phù hợp.

  • Subtask 2 (30 points): 1≤a<b1\le a<b, tồn tại x≤106x\le10^6 phù hợp.

  • Subtask 3 (50 points): 1≤a<b1\le a<b, tồn tại x≤109x\le10^9 phù hợp.

Examples

Input

4 6

Output

12

Explanation

The positive proper divisors of 1212 are 1,2,3,4,61,2,3,4,6. The two largest are 44 and 66, exactly matching the input.