Problem: Ivan plays some computer game. There are n quests in the game. Each quest can be upgraded once, this increases the reward for its completion. Each quest has 3 parameters a_{i}, b_{i}, p_{i}: reward for completing quest before upgrade, reward for completing quest after upgrade (a_{i} < b_{i}) and probability of successful completing the quest.

Each second Ivan can try to complete one quest and he will succeed with probability p_{i}. In case of success Ivan will get the reward and opportunity to upgrade any one quest (not necessary the one he just completed). In case of failure he gets nothing. Quests do not vanish after completing.

Ivan has t seconds. He wants to maximize expected value of his total gain after t seconds. Help him to calculate this value.

Input

First line contains 2 integers n ( 1 ≤ n ≤ 10^{5}) and t ( 1 ≤ t ≤ 10^{10}) — number of quests and total time.

Following n lines contain description of quests. Each description is 3 numbers a_{i} b_{i} p_{i} (1 ≤ a_{i} < b_{i} ≤ 10^{8}, 0 < p_{i} < 1) — reward for completing quest before upgrade, reward for completing quest after upgrade and probability of successful completing of quest. a_{i} and b_{i} are integers. All probabilities are given with at most 9 decimal places.

Output

Print the expected value.

Your answer will be accepted if absolute or relative error does not exceed 10^{-6}. Formally, let your answer be a, and the jury's answer be b. Your answer is considered correct if (|a-b|)/(max⁡(b,    1)) ≤ 10^{-6}.

Examples

Input

3 2
3 1000 0.5
1 2 0.48
3 20 0.3


Output

252.2500000000000


Input

2 2
1 1000 0.1
2 3 0.2


Output

20.7200000000000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using std::cin;
using std::cout;
struct pt {
  long double x, y;
} node;
inline bool operator==(const pt& x, const pt& y) {
  return x.x == y.x && x.y == y.y;
}
inline long double cross(const pt& x, const pt& y, const pt& z) {
  return (y.x - x.x) * (z.y - x.y) - (z.x - x.x) * (y.y - x.y);
}
inline bool cmp0(const pt& x, const pt& y) { return cross(node, x, y) < 0; }
inline bool cmp1(const pt& x, const pt& y) { return x.x < y.x; }
long double max;
struct mat {
  long double a[3][3];
  inline mat() { memset(a, 0, sizeof a); }
  inline mat operator*(const mat& b) const {
    mat ret;
    for (int i = 0; i < 3; ++i) {
      for (int j = 0; j < 3; ++j) {
        for (int k = 0; k < 3; ++k) {
          ret.a[i][k] += a[i][j] * b.a[j][k];
        }
      }
    }
    return ret;
  }
};
inline mat to_mat(long double a00, long double a01, long double a02,
                  long double a10, long double a11, long double a12,
                  long double a20, long double a21, long double a22) {
  mat ret;
  ret.a[0][0] = a00, ret.a[0][1] = a01, ret.a[0][2] = a02;
  ret.a[1][0] = a10, ret.a[1][1] = a11, ret.a[1][2] = a12;
  ret.a[2][0] = a20, ret.a[2][1] = a21, ret.a[2][2] = a22;
  return ret;
}
inline mat to_mat(const pt& i) {
  return to_mat(1, i.x * max, 0, 0, 1 - i.x, 0, 1, i.y, 1);
}
const mat I = to_mat(1, 0, 0, 0, 1, 0, 0, 0, 1);
std::vector<pt> vec;
int n;
long long t;
mat power[100];
int main() {
  std::ios::sync_with_stdio(false), cin.tie(0);
  cin >> n >> t;
  for (int i = 0, a, b; i < n; ++i) {
    long double p;
    cin >> a >> b >> p;
    max = std::max<long double>(max, b * p);
    vec.push_back((pt){(long double)p, a * p});
  }
  sort(vec.begin(), vec.end(), cmp1);
  std::vector<pt> hull;
  for (const pt& i : vec) {
    for (; hull.size() > 1 &&
           cross(hull[hull.size() - 2], hull.back(), i) >= 0;) {
      hull.pop_back();
    }
    hull.push_back(i);
  }
  mat res = to_mat(0, 0, 1, 0, 0, 0, 0, 0, 0);
  for (int i = 0; i < hull.size(); ++i) {
    const pt m0 = hull[i], m1 = i == hull.size() - 1 ? m0 : hull[i + 1];
    power[0] = to_mat(m0);
    for (int i = 1; i < 35; ++i) {
      power[i] = power[i - 1] * power[i - 1];
    }
    const auto check = [&](const mat& M, const pt& x, const pt& y) {
      if (x == y) return true;
      const long double t = M.a[0][0], s = M.a[0][1];
      return (t * max - s) * (x.x - y.x) >= (y.y - x.y);
    };
    for (int i = 34; i >= 0; --i) {
      if (1ll << i <= t) {
        mat x = res * power[i];
        if (check(x, m0, m1)) {
          res = x;
          t -= 1ll << i;
        }
      }
    }
    if (t) {
      if (check(res, m0, m1)) {
        res = res * power[0];
        --t;
      }
    }
  }
  printf("%.10Lf\n", res.a[0][1]);
}