#arc102a. [arc102_a]Triangular Relationship
[arc102_a]Triangular Relationship
Problem Statement
You are given integers and . Find the number of triples of positive integers not greater than such that and are all multiples of . The order of does matter, and some of them can be the same.
Constraints
- and are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the number of triples of positive integers not greater than such that and are all multiples of .
Sample Input 1
3 2
Sample Output 1
9
$(1,1,1),(1,1,3),(1,3,1),(1,3,3),(2,2,2),(3,1,1),(3,1,3),(3,3,1)$ and satisfy the condition.
Sample Input 2
5 3
Sample Output 2
1
Sample Input 3
31415 9265
Sample Output 3
27
Sample Input 4
35897 932
Sample Output 4
114191