#include <bits/stdc++.h>
int n, s[101000], t;
long long T, rsec[101000];
struct data {
  double a, b, p;
} d[101000];
double ans, MaxBP, rres[101000];
double Mul(long double a, long long b) {
  double c(1);
  for (; b; b >>= 1, a *= a)
    if (b & 1) c *= a;
  return c;
}
bool cmp(data a, data b) { return a.p * a.a > b.p * b.a; }
double f(data x, long long t, long long rsec, double rres) {
  double temp = Mul(1.0 - x.p, t);
  return MaxBP * t + (x.a - MaxBP / x.p) * (1.0 - temp) +
         MaxBP * rsec * (1.0 - temp) + temp * rres;
}
long long GetMinT(data x, data y, long long rsec, long long rres) {
  long long L = 0, R = T, M;
  if (f(x, 1, rsec + R, f(y, R, rsec, rres)) <= f(y, R + 1, rsec, rres))
    return R + rsec + 1;
  for (; L + 1 < R;) {
    M = (L + R + 1) / 2;
    if (f(x, 1, rsec + M, f(y, M, rsec, rres)) > f(y, M + 1, rsec, rres))
      R = M;
    else
      L = M;
  }
  return R + rsec;
}
int main() {
  long long rest;
  scanf("%d%I64d", &n, &T);
  MaxBP = -1e10;
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf%lf", &d[i].a, &d[i].b, &d[i].p);
    if (d[i].b * d[i].p > MaxBP) MaxBP = d[i].b * d[i].p;
  }
  std::sort(d, d + n, cmp);
  t = 0;
  for (int i = 0; i < n; i++) {
    if (t > 0 && GetMinT(d[i], d[s[t - 1]], rsec[t - 1], rres[t - 1]) >= T)
      continue;
    for (; t > 0 && f(d[i], 1, rsec[t - 1], rres[t - 1]) >
                        f(d[s[t - 1]], 1, rsec[t - 1], rres[t - 1]);
         t--)
      ;
    s[t] = i;
    if (t > 0) {
      rsec[t] = GetMinT(d[i], d[s[t - 1]], rsec[t - 1], rres[t - 1]);
      rres[t] = f(d[s[t - 1]], rsec[t] - rsec[t - 1], rsec[t - 1], rres[t - 1]);
    } else {
      rsec[t] = 0;
      rres[t] = 0;
    }
    t++;
  }
  ans = f(d[s[t - 1]], T - rsec[t - 1], rsec[t - 1], rres[t - 1]);
  printf("%lf\n", ans);
  return 0;
}
