n participants of the competition were split into m teams in some manner so 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

The only line of input contains two integers n and m, separated by a single space (1 ≤ m ≤ n ≤ 109) — the number of participants and the number of teams respectively. 

Output

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.

Examples

Input

5 1


Output

10 10


Input

3 2


Output

1 1


Input

6 3


Output

3 6

Note

In the first sample all the participants get into one team, so there will be exactly ten pairs of friends.

In the second sample at any possible arrangement one team will always have two participants and the other team will always have one participant. Thus, the number of pairs of friends will always be equal to one.

In the third sample minimum number of newly formed friendships can be achieved if participants were split on teams consisting of 2 people, maximum number can be achieved if participants were split on teams of 1, 1 and 4 people.
import java.util.*;
import java.lang.*;
import java.io.*;

public class RandomTeams {
    BufferedReader input;
    BufferedWriter output;
    StringTokenizer st;
    
    
    // My Solution
    void solve() throws IOException {
        int n = getInt();
        int m = getInt();
        // for min
        long d = m-n%m;
        long e = n/m;
        long min = (d*e*(e-1))+((m-d)*(e+1)*e);
        // for max
        int p = n-m+1;
        long max = (long) p * (p-1);
        min /= 2;
        max /= 2;
        print(min+" "+max+"\n");
    }
    
    
    // Some basic functions
    int min(int...i){
        int min = Integer.MAX_VALUE;
        for (int value : i) min = Math.min(min, value);
        return min;
    }
    int max(int...i){
        int max = Integer.MIN_VALUE;
        for (int value : i) max = Math.max(max, value);
        return max;
    }
    // Printing stuff
    void print(int... i) throws IOException {
        for (int value : i) output.write(value + " ");
    }
    void print(long... l) throws IOException {
        for (long value : l) output.write(value + " ");
    }
    void print(String... s) throws IOException {
        for (String value : s) output.write(value);
    }
    void nextLine() throws IOException {
        output.write("\n");
    }
    // Taking Inputs
    int[][] getIntMat(int n, int m) throws IOException {
        int[][] mat = new int[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                mat[i][j] = getInt();
        return mat;
    }
    char[][] getCharMat(int n, int m) throws IOException {
        char[][] mat = new char[n][m];
        for (int i = 0; i < n; i++) {
            String s = input.readLine();
            for (int j = 0; j < m; j++) 
                mat[i][j] = s.charAt(j);
        }
        return mat;
    }
    int getInt() throws IOException {
        if(st ==null || !st.hasMoreTokens())
            st = new StringTokenizer(input.readLine());
        return Integer.parseInt(st.nextToken());
    }
    int[] getInts(int n) throws IOException {
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = getInt();
        return a;
    }
    long getLong() throws IOException {
        if(st==null || !st.hasMoreTokens())
            st = new StringTokenizer(input.readLine());
        return Long.parseLong(st.nextToken());
    }
    long[] getLongs(int n) throws IOException {
        long[] a = new long[n];
        for (int i = 0; i < n; i++)
            a[i] = getLong();
        return a;
    }
    // Checks whether the code is running on OnlineJudge or LocalSystem
    boolean isOnlineJudge() {
        if (System.getProperty("ONLINE_JUDGE") != null)
            return true;
        try {
            return System.getProperty("LOCAL")==null;
        } catch (Exception e) {
            return true;
        }
    }
    // Handling CodeExecution
    public static void main(String[] args) throws Exception {
        new RandomTeams().run();
    }
    void run() throws IOException {
        // Defining Input Streams
        if (isOnlineJudge()) {
            input = new BufferedReader(new InputStreamReader(System.in));
            output = new BufferedWriter(new OutputStreamWriter(System.out));
        } else {
            input = new BufferedReader(new FileReader("input.txt"));
            output = new BufferedWriter(new FileWriter("output.txt"));
        }
        // Running Logic
        solve();
        output.flush();
        // Run example test cases
        if (!isOnlineJudge()) {
            BufferedReader output = new BufferedReader(new FileReader("output.txt"));
            BufferedReader answer = new BufferedReader(new FileReader("answer.txt"));
            StringBuilder outFile = new StringBuilder();
            StringBuilder ansFile = new StringBuilder();
            String temp;
            while ((temp = output.readLine()) != null)
                outFile.append(temp.trim());
            while ((temp = answer.readLine()) != null)
                ansFile.append(temp.trim());
            if (outFile.toString().equals(ansFile.toString()))
                System.out.println("Test Cases Passed!!!");
            else
                System.out.println("Failed...");
        }
    }
}