351. Teams

0

Easy

In a highly esteemed coding competition, there are N participants who have come from various parts of the country to showcase their programming skills. These participants are divided into M teams in some manner. It is important to note that each team consists of at least one participant. After the competition, every pair of participants from the same team becomes friends.

Your task is to develop a program that can determine the minimum and maximum number of friend pairs that could have formed by the end of the competition.

Input Format

The input consists of a single line containing two integers N and M, separated by a space. These represent the number of participants and the number of teams, respectively.

Output Format

The output should consist of a single line containing two integers kmin and kmax, separated by a space. These represent the minimum and maximum possible number of friend pairs, respectively.

Example

Input

5 1

Output

10 10

Constraints

1 ≤ M ≤ 10^9 1 ≤ N ≤ 10^9
Loading...

View Submissions

Console