1. You are given two integers N and M which represents the length and breadth of a paper respectively. 2. You have to divide the given paper into pieces such that every piece is a square. 3. You have to find the minimum number of such pieces.
Input Format
Two integers N and M
Output Format
Check the sample output and question video.
Constraints
1 <= N,M <= 10^3
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
30 35
Output
5