The Spinning Beacon and Scanner
A lighthouse beacon rotates continuously in a fixed direction, completing one full rotation every p₁ time units. At a coastal monitoring station, a scanner checks the beacon's current direction every p₂ time units.
Both the beacon and scanner start at time 0 in a perfectly aligned state—the beacon is pointing in the direction the scanner is checking. The beacon rotates smoothly without interruption, and the scanner performs its checks at discrete intervals.
After time 0, how many complete rotations will the beacon have made by the time they are aligned again?
Input
The first line contains two integers p₁ and p₂ (1 ≤ p₁, p₂ ≤ 10^9).
Output
Print a single integer: the number of complete rotations the beacon makes before it and the scanner align again.
Notes
The beacon and scanner are aligned again when the time is a common multiple of both p₁ and p₂. The first such time after 0 is their least common multiple.