Treasure Hunter
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Young treasure hunter Roma took a course in the specialty "pantry thing" and now runs a summer practice. Summer practice is near the village of "Dawn Stone" and lasts exactly b days. Every day the novel is a coin buried in the vicinity. Thus, at the end of the first day, he had a coin at the end of the second 2 * a, and at the end of practice at the Roma must be accumulated b * a coins.
If at the end of the day the responsible teacher noticed that the number is divisible by Romas coins b, the Roma were allowed to take off the shelf cake, which he immediately ate. Romas help calculate how many pies he eats during an internship.
Input
Two integers a and b (1 ≤ a, b ≤ 10^9
).
Output
Print the number of pies eaten by Roma.
Examples
Input #1
Answer #1
Submissions 4K
Acceptance rate 34%