Mike wrote the remainder of each number from 1 to n when divided by k. He wants to find how many pairs have equal value, namely how many ordered pairs exist such that .
The first line contains 2 numbers separated by space.
Output the number of ordered pairs that satisfy the relation.
The pairs are : .