744. Teams
0
Easy
In a very prestigious coding competition, N participants from different part of the country have come to participate. These participants, who have come to display their programming prowers, are split into M teams in some manner. It should be noted that each team has at least one participant. After the competition each pair of participants from the same team became friends.
Your task is to write a program that will find the minimum and the maximum number of pairs of friends that could have formed by the end of the competition.
Input Format
The only line of input contains two integers N and M, separated by a single space — the number of participants and the number of teams respectively.
Output Format
The only line of the output should contain two integers kmin and kmax — the minimum possible number of pairs of friends and the maximum possible number of pairs of friends respectively.
Example
Input
5 1
Output
10 10
Constraints
1 ≤ M ≤ 10^9
1 ≤ N ≤ 10^9
Loading...
View Submissions
Console