#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXN = 100000;
struct Q {
  int aget, bget;
  double p;
  double cnst, upto;
};
bool operator<(const Q &a, const Q &b) { return a.cnst > b.cnst; }
int n;
long long t;
Q q[MAXN];
Q use[MAXN];
int nuse;
double overtake(const Q &a, const Q &b) {
  return (b.cnst - a.cnst) / (a.p - b.p);
}
double pw(double x, long long n) {
  double ret = 1;
  while (true) {
    if (n & 1) ret = ret * x;
    if ((n >>= 1) == 0) return ret;
    x = x * x;
  }
}
double solve() {
  double z = 0;
  for (int i = (0); i < (n); ++i) z = max(z, q[i].bget * q[i].p);
  for (int i = (0); i < (n); ++i) q[i].cnst = q[i].p * q[i].aget;
  sort(q, q + n);
  nuse = 0;
  for (int i = (0); i < (n); ++i) {
    if (nuse > 0 && q[i].p <= use[nuse - 1].p) continue;
    while (nuse >= 2 && overtake(use[nuse - 1], use[nuse - 2]) >
                            overtake(q[i], use[nuse - 1]))
      --nuse;
    use[nuse++] = q[i];
  }
  double ret = 0;
  long long k = 0;
  for (int i = (0); i < (nuse); ++i) {
    long long ntimes;
    if (i + 1 < nuse) {
      long long l = -1, h = t - k;
      while (l + 1 < h) {
        long long m = l + (h - l) / 2;
        double pp = pw(1 - use[i].p, m);
        double have =
                   pp * (k * z - ret) + (z - use[i].cnst) * (1 - pp) / use[i].p,
               want = overtake(use[i + 1], use[i]);
        if (have > want)
          h = m;
        else
          l = m;
      }
      ntimes = h;
    } else {
      ntimes = t - k;
    }
    {
      long long nk = k + ntimes;
      double pp = pw(1 - use[i].p, ntimes);
      double have =
          pp * (k * z - ret) + (z - use[i].cnst) * (1 - pp) / use[i].p;
      ret = nk * z - have;
      k = nk;
    }
  }
  return ret;
}
void run() {
  scanf("%d%lld", &n, &t);
  for (int i = (0); i < (n); ++i)
    scanf("%d%d%lf", &q[i].aget, &q[i].bget, &q[i].p);
  printf("%.15lf\n", solve());
}
int main() {
  run();
  return 0;
}
