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.math.*;
import java.util.*;
public class Main {
static class FastScanner{	
   private int BUFFER_SIZE = 1 << 16;
   
   private  DataInputStream din;
   
   private  byte[] buffer;
   
   private int bufferPointer, bytesRead;
   
   public FastScanner() {
       din = new DataInputStream(System.in);
       buffer = new byte[BUFFER_SIZE];
       bufferPointer = bytesRead = 0;
   }
 
   public FastScanner( String file_name) throws IOException {
       din = new DataInputStream(new FileInputStream(file_name));
       buffer = new byte[BUFFER_SIZE];
       bufferPointer = bytesRead = 0;
   }
   
   public String nextLine() throws IOException {
        byte[] buf = new byte[64];
       int cnt = 0, c;
       while ((c = read()) != -1) {
           if (c == '\n')
               break;
           buf[cnt++] = (byte) c;
       }
       return new String(buf, 0, cnt);
   }
   
   public String next() throws IOException{
 
       byte c = read();
       while(Character.isWhitespace(c)){
           c = read();
       }
       
        StringBuilder builder = new StringBuilder();
       builder.append((char)c);
       c = read();
       while(!Character.isWhitespace(c)){
           builder.append((char)c);
           c = read();
       }
       
       return builder.toString();
   }
 
   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 int[] nextIntArray( int n) throws IOException {
        int arr[] = new int[n];
       for(int i = 0; i < n; i++){
           arr[i] = nextInt();
       }
       return arr;
   }
   public int[][] nextInt2DArray( int r,int c) throws IOException {
      int arr[][] = new int[r][c];
      for(int i = 0; i < r; i++){
    	  for(int j=0;j < c; j++) {
              arr[i][j] = nextInt();
    	  }
      }
      return arr;
  }
   public int[][] nextInt2DArray(int n) throws IOException {
	      int arr[][] = new int[n][n];
	      for(int i = 0; i < n; i++){
	    	  for(int j=0;j < n; j++) {
	              arr[i][j] = nextInt();
	    	  }
	      }
	      return arr;
   }
   
 
   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 long[] nextLongArray( int n) throws IOException {
        long arr[] = new long[n];
       for(int i = 0; i < n; i++){
           arr[i] = nextLong();
       }
       return arr;
   }
   public long[][] nextLong2DArray( int r,int c) throws IOException {
	      long arr[][] = new long[r][c];
	      for(int i = 0; i < r; i++){
	    	  for(int j = 0;j < c; j++) {
	              arr[i][j] = nextLong();
	    	  }
	      }
	      return arr;
	  }
   public long[][] nextLong2DArray( int n) throws IOException {
	      long arr[][] = new long[n][n];
	      for(int i = 0; i < n; i++){
	    	  for(int j = 0;j < n; j++) {
	              arr[i][j] = nextLong();
	    	  }
	      }
	      return arr;
	  }
 
   public char nextChar() throws IOException{
       byte c = read();
       while(Character.isWhitespace(c)){
           c = read();
       }
       return (char) c;	
   }
   public char[] nextCharArray(int n)throws IOException {
       char arr[] = new char[n];
      for(int i = 0; i < n; i++){
          arr[i] = nextChar();
      }
      return arr;
   }
   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;
   }
   
   public double[] nextDoubleArray( int n) throws IOException {
        double arr[] = new double[n];
       for(int i = 0; i < n; i++){
           arr[i] = nextDouble();
       }
       return arr;
   }
 
   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 boolean isPrime(int n) {
		if(n<2) return false;
		for(int i=2;i<=(int)Math.sqrt(n);i++) {
			if(n%i==0) return false;
		}
		return true;
	}
	public boolean isPrime(long n) {
		if(n<2) return false;
		for(long i=2;i<=(long)Math.sqrt(n);i++) {
			if(n%i==0) return false;
		}
		return true;
	}
	public boolean isCoPrime(int a,int b) {
		if(gcd(a,b)==1)return true;
		return false;
	}
	public boolean isCoPrime(long a,long b) {
		if(gcd(a,b)==1)return true;
		return false;
	}
	public boolean isPlaindrome(String S) {
	        for(int i=0;i<(S.length()/2);i++){
	            int x=S.length()-i-1;
	            if(S.charAt(i)!=S.charAt(x))return false;
	        }
	        return true;
	}
	public boolean[] sieve (int n) {
		boolean primes[]=new boolean[n+1];
		Arrays.fill(primes,true);
		primes[0]=primes[1]=false;
		for(int i=2;i*i<=n;i++){
			if(primes[i]){
				for(int j=i*i;j<=n;j+=i)
					primes[j]=false;
			}
		}
		return primes;
	}
	public long gcd(long a,long b){
		return (BigInteger.valueOf(a).gcd(BigInteger.valueOf(b))).longValue();
	}
	public int gcd(int a,int b){
		return (BigInteger.valueOf(a).gcd(BigInteger.valueOf(b))).intValue();
	}
	public int digits(int a){
		return (int) (Math.floor(Math.log10(a)) + 1);
	} 
	public long digits(long a){
		return (long) (Math.floor(Math.log10(a)) + 1);
	}
	public double log(int N,int b)
	{
		return(Math.log10(N)/Math.log10(b));
	}
	public double log(long N,long b)
	{
		return(Math.log10(N)/Math.log10(b));
	}
	public double log(double N,double b)
	{
		return(Math.log10(N)/Math.log10(b));
	}
	public boolean isPowerOfTwo (int x) 
	{ 
	      return (x!=0 && ((x&(x-1)) == 0));     
	}
	public void reverseArray(int ar[], int start, int end)
	{
		int temp;
		while(start<end)
		{
			temp = ar[start];
			ar[start]=ar[end];
			ar[end]=temp;
			start++;
			end--;
		}
	}
    public int powerMod(int a,int N,int M) {
        if (N == 0) {
            return 1;
        } else {
            final int R = powerMod(a, N / 2, M);
            if (N % 2 == 0) {
                return (R * R) % M;
            } else {
                return (R * R * a) % M;
            }
        }
    }
    public long powerMod(long a,long N,long M) {
        if (N == 0) {
            return 1;
        } else {
            final long R = powerMod(a, N / 2, M);
            if (N % 2 == 0) {
                return (R * R) % M;
            } else {
                return (R * R * a) % M;
            }
        }
    }
}
    
    static FastScanner sc=new FastScanner();
	public static void main(String[] args)throws IOException {
		long n=sc.nextLong();
		long m=sc.nextLong();
		long max=maximum(n,m);
		long min=minimum(n,m);
		System.out.println(min+" "+max);
	}
	private static long minimum(long n, long m) {
		long rem=n%m;
		long d=n/m;
		if(d>1)
			return (nCr((d+1),2)*rem)+(nCr(d,2)*(m-rem)) ;
		else
			return (nCr((d+1),2)*rem);
		
	}
	private static long maximum(long n, long m) {
		long cal=n-m+1;
		if(cal>1)
			return nCr(cal,2);
		else
			return 0;
	}
    static long nCr(long n, long r)
    {
 
        // p holds the value of n*(n-1)*(n-2)...,
        // k holds the value of r*(r-1)...
        long p = 1, k = 1;
 
        // C(n, r) == C(n, n-r),
        // choosing the smaller value
        if (n - r < r) {
            r = n - r;
        }
 
        if (r != 0) {
            while (r > 0) {
                p *= n;
                k *= r;
 
                // gcd of p, k
                long m = __gcd(p, k);
 
                // dividing by gcd, to simplify
                // product division by their gcd 
                // saves from the overflow
                p /= m;
                k /= m;
 
                n--;
                r--;
            }
 
            // k should be simplified to 1
            // as C(n, r) is a natural number
            // (denominator should be 1 ) .
        }
        else {
            p = 1;
        }
 
        // if our approach is correct p = ans and k =1
        return p;
    }
 
    static long __gcd(long n1, long n2)
    {
        long gcd = 1;
 
        for (int i = 1; i <= n1 && i <= n2; ++i) {
            // Checks if i is factor of both integers
            if (n1 % i == 0 && n2 % i == 0) {
                gcd = i;
            }
        }
        return gcd;
    }
}
