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

public class codeforces {
   public static void main(String[] args) {
      InputStream inputStream = System.in;
      OutputStream outputStream = System.out;
      if (System.getProperty("ONLINE_JUDGE") == null) {
         try {
            sc = new InputReader(new FileInputStream("input.txt"));
            out = new PrintWriter(new FileOutputStream("output.txt"));
         } catch (Exception ignored) {
         }
         int t = 1;
         // t = sc.nextInt();
         while (t-- > 0)
            solve();
         out.flush();
      } else {
         sc = new InputReader(inputStream);
         out = new PrintWriter(outputStream);
         int t = 1;
         // t = sc.nextInt();
         while (t-- > 0) {
            solve();
         }
         out.flush();
      }

   }

   public static void solve() {
      int n =sc.nextInt();
      int m =sc.nextInt();
      long max=ans(n+1-m);
      long k1=n/m;
      long k2=n%m;
      long k3=m-k2;
      long min=k3*ans(k1)+k2*ans(k1+1);   
      out.println(min+" "+max);
   }
   

   private static long ans(long n) {
      return (n*(n-1))/2;
   }


   public static InputReader sc;
   public static PrintWriter out;

   static class InputReader {
      public BufferedReader reader;
      public StringTokenizer tokenizer;

      public InputReader(InputStream stream) {
         reader = new BufferedReader(new InputStreamReader(stream), 32768);
         tokenizer = null;
      }

      public String next() {
         while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
               tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
               throw new RuntimeException(e);
            }
         }
         return tokenizer.nextToken();
      }

      public int nextInt() {
         return Integer.parseInt(next());
      }

      public long nextLong() {
         return Long.parseLong(next());
      }

      public double nextDouble() {
         return Double.parseDouble(next());
      }
   }

   public static int inf = Integer.MAX_VALUE;
   public static int minf = Integer.MIN_VALUE;
   public static int mod = 1000000007;

   public static int countDigits(int l) {
      if (l >= 1000000000)
         return 10;
      if (l >= 100000000)
         return 9;
      if (l >= 10000000)
         return 8;
      if (l >= 1000000)
         return 7;
      if (l >= 100000)
         return 6;
      if (l >= 10000)
         return 5;
      if (l >= 1000)
         return 4;
      if (l >= 100)
         return 3;
      if (l >= 10)
         return 2;
      return 1;
   }

   public static int countDigits(long l) {
      if (l >= 1000000000000000000L)
         return 19;
      if (l >= 100000000000000000L)
         return 18;
      if (l >= 10000000000000000L)
         return 17;
      if (l >= 1000000000000000L)
         return 16;
      if (l >= 100000000000000L)
         return 15;
      if (l >= 10000000000000L)
         return 14;
      if (l >= 1000000000000L)
         return 13;
      if (l >= 100000000000L)
         return 12;
      if (l >= 10000000000L)
         return 11;
      if (l >= 1000000000L)
         return 10;
      if (l >= 100000000L)
         return 9;
      if (l >= 10000000L)
         return 8;
      if (l >= 1000000L)
         return 7;
      if (l >= 100000L)
         return 6;
      if (l >= 10000L)
         return 5;
      if (l >= 1000L)
         return 4;
      if (l >= 100L)
         return 3;
      if (l >= 10L)
         return 2;
      return 1;
   }

   public static long nCr(int n, int k) {
      long ans = 1L;
      k = k > n - k ? n - k : k;
      int j = 1;
      for (; j <= k; j++, n--) {
         if (n % j == 0) {
            ans *= n / j;
         } else if (ans % j == 0) {
            ans = ans / j * n;
         } else {
            ans = (ans * n) / j;
         }
      }
      return ans;
   }

   public static String reverseString(String input) {
      StringBuilder str = new StringBuilder("");

      for (int i = input.length() - 1; i >= 0; i--) {
         str.append(input.charAt(i));
      }
      return str.toString();
   }

   public static int maxOf3(int x, int y, int z) {
      return Math.max(x, Math.max(y, z));
   }

   public static int minof3(int x, int y, int z) {
      return Math.min(x, Math.min(y, z));
   }

   public static long maxOf3(long x, long y, long z) {
      return Math.max(x, Math.max(y, z));
   }

   public static long minof3(long x, long y, long z) {
      return Math.min(x, Math.min(y, z));
   }

   public static void arrInput(int[] arr, int n) {
      for (int i = 0; i < n; i++)
         arr[i] = sc.nextInt();
   }

   public static void arrInput(long[] arr, int n) {
      for (int i = 0; i < n; i++)
         arr[i] = sc.nextLong();
   }

   public static int maxarrInput(int[] arr, int n) {
      int max = 0;
      for (int i = 0; i < n; i++) {
         arr[i] = sc.nextInt();
         max = Math.max(max, arr[i]);
      }
      return max;

   }

   public static long maxarrInput(long[] arr, int n) {
      long max = 0;
      for (int i = 0; i < n; i++) {
         arr[i] = sc.nextLong();
         max = Math.max(max, arr[i]);
      }
      return max;
   }

   public static int minarrInput(int[] arr, int n) {
      int min = Integer.MAX_VALUE;
      for (int i = 0; i < n; i++) {
         arr[i] = sc.nextInt();
         min = Math.max(min, arr[i]);
      }
      return min;
   }

   public static long minarrInput(long[] arr, int n) {
      long min = 0;
      for (int i = 0; i < n; i++) {
         arr[i] = sc.nextLong();
         min = Math.max(min, arr[i]);
      }
      return min;
   }

   public static long sumofarr(int[] arr) {
      long sum = 0;
      for (int i : arr)
         sum += i;
      return sum;
   }

   public static long sumofarr(long[] arr) {
      long sum = 0;
      for (long i : arr)
         sum += i;
      return sum;
   }

   public static int lowerBound(int[] arr, int x) {
      int l = -1, r = arr.length;
      while (l + 1 < r) {
         int m = (l + r) >>> 1;
         if (arr[m] >= x)
            r = m;
         else
            l = m;
      }
      return r;
   }

   public static int upperBound(int[] arr, int x) {
      int l = -1, r = arr.length;
      while (l + 1 < r) {
         int m = (l + r) >>> 1;
         if (arr[m] <= x)
            l = m;
         else
            r = m;
      }
      return l + 1;
   }

   public static long maxofarr(long[] arr) {
      long max = 0;
      for (long i : arr)
         max = Math.max(i, max);
      return max;
   }

   public static long minofarr(long[] arr) {
      long min = Integer.MAX_VALUE;
      for (long i : arr)
         min = Math.min(min, i);
      return min;
   }

   public static int maxofarr(int[] arr) {
      int max = 0;
      for (int i : arr)
         max = Math.max(i, max);
      return max;
   }

   public static int minofarr(int[] arr) {
      int min = Integer.MAX_VALUE;
      for (int i : arr)
         min = Math.min(min, i);
      return min;
   }
}
