#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
const long long INF = 1e18 + 7;
const double eps = 1e-10;
double p[N], vm[N];
long long a[N], b[N];
double maxn = 0;
long long n, m = 0, sz = 1, t;
struct fac {
  double k, b;
} f[N], dd[N], st[N];
bool cmp(fac x, fac y) { return x.k < y.k; }
double meet(fac u, fac v) { return (u.b - v.b) / (v.k - u.k); }
double ans[4][4], now[44][4][4], rp[4][4], cr3[4][4];
void cf(double cr0[4][4], double cr1[4][4], double cr2[4][4]) {
  for (int i = 1; i <= 3; i++) {
    for (int j = 1; j <= 3; j++) {
      cr3[i][j] = 0;
      for (int k = 1; k <= 3; k++) cr3[i][j] += cr1[i][k] * cr2[k][j];
    }
  }
  for (int i = 1; i <= 3; i++)
    for (int j = 1; j <= 3; j++) cr0[i][j] = cr3[i][j];
}
double check(double q, long long t, double p[4][4]) {
  return q * p[1][1] + t * p[1][2] + p[1][3];
}
void work(fac v, long long &nw, double &dp, double R) {
  if (nw == t) return;
  if (nw * maxn - dp >= R) return;
  now[0][1][1] = 1 - v.k;
  now[0][1][2] = v.k * maxn;
  now[0][1][3] = v.b;
  now[0][2][2] = now[0][2][3] = now[0][3][3] = 1;
  now[0][2][1] = now[0][3][1] = now[0][3][2] = 0;
  memset(ans, 0, sizeof(ans));
  long long i = 0, cs = 0;
  for (; maxn * ((1ll << i) + nw) - check(dp, nw, now[i]) <= R &&
         nw + (1ll << i) < t;
       i++)
    cf(now[i + 1], now[i], now[i]);
  for (int i = 1; i <= 3; i++) ans[i][i] = 1;
  for (; ~i; i--) {
    for (int j = 1; j <= 3; j++)
      for (int k = 1; k <= 3; k++) rp[j][k] = ans[j][k];
    cf(ans, ans, now[i]);
    if ((nw + cs + (1ll << i)) * maxn - check(dp, nw, ans) <= R &&
        nw + cs + (1ll << i) < t)
      cs += (1ll << i);
    else
      for (int j = 1; j <= 3; j++)
        for (int k = 1; k <= 3; k++) ans[j][k] = rp[j][k];
  }
  cf(ans, ans, now[0]);
  double an = dp * ans[1][1] + nw * ans[1][2] + ans[1][3];
  dp = an;
  nw += cs + 1;
}
int main() {
  scanf("%I64d%I64d", &n, &t);
  for (int i = 1; i <= n; i++) scanf("%I64d%I64d%lf", &a[i], &b[i], &p[i]);
  for (int i = 1; i <= n; i++) f[i] = (fac){p[i], p[i] * a[i]};
  for (int i = 1; i <= n; i++) maxn = max(maxn, b[i] * p[i]);
  sort(f + 1, f + n + 1, cmp);
  dd[++m] = f[1];
  for (int i = 2; i <= n; i++) {
    if (f[i].k > f[i - 1].k + eps || f[i].k < f[i - 1].k - eps)
      dd[++m] = f[i];
    else
      dd[m].b = max(dd[m].b, f[i].b);
  }
  for (int i = 1; i <= m; i++) f[i] = dd[i];
  st[1] = f[1];
  for (int i = 1; i <= m; i++) {
    while (sz > 1) {
      double r1 = meet(st[sz - 1], f[i]), r2 = meet(st[sz], f[i]);
      if (r1 < r2) break;
      sz--;
    }
    st[++sz] = f[i];
  }
  for (int i = 1; i <= sz - 1; i++) vm[i] = meet(st[i], st[i + 1]);
  vm[sz] = INF;
  long long nw = 0;
  double dp = 0;
  for (int i = 1; i <= sz; i++) work(st[i], nw, dp, vm[i]);
  printf("%.9lf\n", dp);
  return 0;
}
