#include <bits/stdc++.h>
int n, k = 0;
long long m, t = 0;
std::pair<double, double> a[100002], V[100002];
double v[100002], maxx = 0, ans = 0, b[3], c[3];
struct matrix {
  double a[3][3];
  matrix() {
    a[0][0] = a[0][1] = a[0][2] = 0;
    a[1][0] = a[1][1] = a[1][2] = 0;
    a[2][0] = a[2][1] = a[2][2] = 0;
  }
  matrix operator*(matrix &p) {
    matrix t;
    t.a[0][0] = a[0][0] * p.a[0][0] + a[0][1] * p.a[1][0] + a[0][2] * p.a[2][0];
    t.a[0][1] = a[0][0] * p.a[0][1] + a[0][1] * p.a[1][1] + a[0][2] * p.a[2][1];
    t.a[0][2] = a[0][0] * p.a[0][2] + a[0][1] * p.a[1][2] + a[0][2] * p.a[2][2];
    t.a[1][0] = a[1][0] * p.a[0][0] + a[1][1] * p.a[1][0] + a[1][2] * p.a[2][0];
    t.a[1][1] = a[1][0] * p.a[0][1] + a[1][1] * p.a[1][1] + a[1][2] * p.a[2][1];
    t.a[1][2] = a[1][0] * p.a[0][2] + a[1][1] * p.a[1][2] + a[1][2] * p.a[2][2];
    t.a[2][0] = a[2][0] * p.a[0][0] + a[2][1] * p.a[1][0] + a[2][2] * p.a[2][0];
    t.a[2][1] = a[2][0] * p.a[0][1] + a[2][1] * p.a[1][1] + a[2][2] * p.a[2][1];
    t.a[2][2] = a[2][0] * p.a[0][2] + a[2][1] * p.a[1][2] + a[2][2] * p.a[2][2];
    return t;
  }
} g[36];
void calc(double a[3], matrix &p) {
  static double tmp[3];
  tmp[0] = a[0] * p.a[0][0] + a[1] * p.a[1][0] + a[2] * p.a[2][0];
  tmp[1] = a[0] * p.a[0][1] + a[1] * p.a[1][1] + a[2] * p.a[2][1];
  tmp[2] = a[0] * p.a[0][2] + a[1] * p.a[1][2] + a[2] * p.a[2][2];
  a[0] = tmp[0];
  a[1] = tmp[1];
  a[2] = tmp[2];
}
void init(double a, double b) {
  g[0] = matrix();
  g[0].a[0][0] = 1 - a;
  g[0].a[1][0] = maxx * a;
  g[0].a[1][1] = 1;
  g[0].a[2][0] = b;
  g[0].a[2][1] = 1;
  g[0].a[2][2] = 1;
  for (int i = 1; i <= 34; i++) g[i] = g[i - 1] * g[i - 1];
}
int main() {
  scanf("%d%lld", &n, &m);
  for (int i = 1; i <= n; i++) {
    int v, b;
    double P;
    scanf("%d%d%lf", &v, &b, &P);
    if (P * b >= maxx) maxx = P * b;
    a[i] = std::make_pair(P, P * v);
  }
  std::sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    while ((k && a[i].second >= V[k].second) ||
           (k > 1 &&
            (a[i].second - V[k].second) / (a[i].first - V[k].first) <
                (a[i].second - V[k - 1].second) / (a[i].first - V[k].first)))
      k--;
    V[++k] = a[i];
  }
  for (long long i = 1; i <= k; i++) {
    init(V[i].first, V[i].second);
    if (i != k) {
      double lim =
          (V[i + 1].second - V[i].second) / (V[i + 1].first - V[i].first);
      long long cnt = 0;
      b[0] = ans;
      b[1] = t;
      b[2] = 1;
      for (int i = 34; ~i; i--) {
        c[0] = b[0];
        c[1] = b[1];
        c[2] = b[2];
        calc(b, g[i]);
        if (lim > b[0] - b[1] * maxx)
          b[0] = c[0], b[1] = c[1], b[2] = c[2];
        else
          cnt += 1ll << i;
      }
      if (lim <= b[0] - b[1] * maxx) cnt++, calc(b, g[0]);
      if (t + cnt < m) {
        t += cnt;
        ans = b[0];
        continue;
      }
    }
    long long cnt = m - t;
    b[0] = ans;
    b[1] = t;
    b[2] = 1;
    for (int i = 34; ~i; i--)
      if (cnt >> i & 1) calc(b, g[i]);
    printf("%.6lf", b[0]);
    return 0;
  }
}
