Problem: You have a playlist consisting of n songs. The i-th song is characterized by two numbers t_i and b_i — its length and beauty respectively. The pleasure of listening to set of songs is equal to the total length of the songs in the set multiplied by the minimum beauty among them. For example, the pleasure of listening to a set of 3 songs having lengths [5, 7, 4] and beauty values [11, 14, 6] is equal to (5 + 7 + 4) ⋅ 6 = 96.

You need to choose at most k songs from your playlist, so the pleasure of listening to the set of these songs them is maximum possible.

Input

The first line contains two integers n and k (1 ≤ k ≤ n ≤ 3 ⋅ 10^5) – the number of songs in the playlist and the maximum number of songs you can choose, respectively.

Each of the next n lines contains two integers t_i and b_i (1 ≤ t_i, b_i ≤ 10^6) — the length and beauty of i-th song.

Output

Print one integer — the maximum pleasure you can get.

Examples

Input


4 3
4 7
15 1
3 6
6 8


Output


78


Input


5 3
12 31
112 4
100 100
13 55
55 50


Output


10000

Note

In the first test case we can choose songs {1, 3, 4}, so the total pleasure is (4 + 3 + 6) ⋅ 6 = 78.

In the second test case we can choose song 3. The total pleasure will be equal to 100 ⋅ 100 = 10000.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int xd[] = {1, 0, -1, 0, 1, 1, -1, -1};
int yd[] = {0, -1, 0, 1, 1, -1, 1, -1};
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
inline bool isEqual(double x, double y) {
  const double epsilon = 1e-5;
  return abs(x - y) <= epsilon * abs(x);
}
long double triarea(long long x1, long long y1, long long x2, long long y2,
                    long long x3, long long y3) {
  return (long double)abs(x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) /
         2.0;
}
bool triinside(long x1, long y1, long x2, long y2, long x3, long y3, long x,
               long y) {
  long area1 = triarea(x1, y1, x2, y2, x3, y3);
  long area2 = triarea(x, y, x2, y2, x3, y3);
  long area3 = triarea(x1, y1, x, y, x3, y3);
  long area4 = triarea(x1, y1, x2, y2, x, y);
  if (isEqual(area1, area2 + area3 + area4)) return true;
  return false;
}
long long dist(long long x1, long long y1, long long x2, long long y2) {
  return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
}
const double pi = acos(-1.0);
long double todegree(long double radian) {
  if (radian < 0) radian += 2 * pi;
  return radian * 180 / pi;
}
long double toradian(long double degree) { return degree * pi / 180.0; }
long long poww(long long x, long long k) {
  long long ret = 1;
  while (k) {
    if (k & 1) ret = (ret * x);
    k >>= 1;
    x = (x * x);
  }
  return ret;
}
long long sumOfNumbers(long long num) {
  long long ret = 0;
  while (num) {
    ret += num % 10;
    num /= 10;
  }
  return ret;
}
unsigned long long fact(unsigned long long n) {
  unsigned long long sum = 1;
  while (n > 1) {
    sum *= n;
    n--;
  }
  return sum;
}
unsigned long long combination(unsigned long long a, unsigned long long b) {
  long long ret = 1;
  for (int i = 0; i < b; i++) ret = ret * (a - i) / (i + 1);
  return ret;
}
int main() {
  std::ios_base::sync_with_stdio(0);
  int n, k;
  scanf("%d%d", &n, &k);
  vector<pair<long long, long long>> vi;
  for (int i = 0; i < (int)(n); ++i) {
    long long a, b;
    scanf("%lld%lld", &a, &b);
    vi.push_back({b, a});
  }
  sort((vi).begin(), (vi).end());
  long long sum = 0, mult = 0;
  set<pair<int, int>> st;
  for (int i = n - 1; i >= 0; i--) {
    st.insert({vi[i].second, i});
    sum += vi[i].second;
    while (st.size() > k) {
      auto it = st.begin();
      sum -= it->first;
      st.erase(it);
    }
    mult = max(mult, sum * vi[i].first);
  }
  cout << mult;
  return 0;
}