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.
Two integers a and b (1 ≤ a, b ≤
Print the number of pies eaten by Roma.