## GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

## Concurrent Lines Solution | CodeChef Problem Solution 2022

While playing in the plains, Chef found a point $A$ with coordinates $\left(X,Y\right)$.

Chef is interested in finding the number of straight lines passing through the point $A$ such that their intercepts on both axes are positive integers.

### Input Format

• First and only line of input contains two integers $X$ and $Y$ - the coordinates of the point $A$.

### Output Format

• For each test case, print an integer - the number of lines satisfying the given conditions.

### Constraints

• $1\le X\le {10}^{12}$
• $1\le Y\le {10}^{12}$

### Sample Input 1

3 2


### Sample Output 1

4


### Explanation

There are $4$ lines satisfying all the conditions. These lines are: ### Sample Input 2

1 2


### Sample Output 2

2


### Explanation

There are $2$ such lines, which are : ### Sample Input 3

28 206


### Sample Output 3

16


### Explanation

There are $16$ such lines.