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.io.*;
import java.util.*;

public class practice {

    // Faster Input...
    static class Reader{
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String next() throws IOException
        {
            byte[] buf = new byte[200001]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == ' ') // you might need c=='\n' also... be careful
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }

    public static void debug(int[] ...var) {
        for(int[] row : var) {
            debug(row);
        }
    }

    public static void debug(long[] ...var) {
        for(long[] row : var) {
            debug(row);
        }
    }

    public static void debug(String[] ...var) {
        for(String[] row : var) {
            debug(row);
        }
    }

    public static void debug(double[] ...var) {
        for(double[] row : var) {
            debug(row);
        }
    }

    public static void debug(int ...var) {
        for(int i:var)  System.err.print(i+" ");
        System.err.println();
    }
    public static void debug(String ...var) {
        for(String i:var)  System.err.print(i+" ");
        System.err.println();
    }
    public static void debug(double ...var) {
        for(double i:var)  System.err.print(i+" ");
        System.err.println();
    }
    
    public static void debug(long ...var) {
        for(long i:var)  System.err.print(i+" ");
        System.err.println();
    }

    /*
    public static <T> void debug(T ...varargs) {
        // Warning
        // Heap Pollution might occur
        // this overrides even 1d and 2d array methods as it is an object... 
        // + i am not using object based array like Integer[]
        // I am using int[] so that is a problem as i need Wrapper class as an argument
        for(T val:varargs)  System.err.printf("%s ",val);
        System.err.println();
    }
    */
    private static long pairs(long n) {
        long answer;
        answer=(n*(n-1))>>1;
        return answer;
    }
    private static Reader scan = new Reader();
    public static void main(String args[]) throws Exception {
        //Faster Output...
        PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        StringBuilder sb = new StringBuilder();
        //Scanner scan = new Scanner(System.in);
        //scan.useDelimiter("");  // for reading character by character
        //be careful of readLine() -- length of string;

        long n = scan.nextLong();
        long m = scan.nextLong();
        long kMin,kMax;
        kMax = pairs(n-m+1);
        long team1 = n-(n/m)*m;
        long pairs1 = team1*pairs(n/m+1);
        long team2 = m-team1;
        long pairs2 = team2*pairs(n/m);
        kMin = pairs1+pairs2;
        sb.append(kMin+" "+kMax);
        out.println(sb);
        
        scan.close();
        out.close();
    }
}
