#include <bits/stdc++.h>
using namespace std;
template <class S, class T>
ostream& operator<<(ostream& o, const pair<S, T>& p) {
  return o << "(" << p.first << "," << p.second << ")";
}
template <class T>
ostream& operator<<(ostream& o, const vector<T>& vc) {
  o << "{";
  for (const T& v : vc) o << v << ",";
  o << "}";
  return o;
}
using ll = long long;
template <class T>
using V = vector<T>;
template <class T>
using VV = vector<vector<T>>;
struct CHT {
  using D = double;
  vector<pair<D, D>> deq;
  vector<int> id;
  int s, sd, t;
  int ID;
  CHT(int N) { init(N); }
  void init(int N) {
    id.resize(N);
    deq.resize(N);
    s = 0, sd = 0, t = 0;
    ID = 0;
  }
  void add(D a, D b) {
    a = -a, b = -b;
    pair<D, D> p(a, b);
    while (s + 1 < t && check(deq[t - 2], deq[t - 1], p)) t--;
    deq[t] = p;
    id[t] = ID++;
    t++;
  }
  pair<D, int> query(D x) {
    int lb = s - 1, ub = t - 1;
    while (ub - lb > 1) {
      int m = (lb + ub) / 2;
      if (isright(deq[m], deq[m + 1], x))
        lb = m;
      else
        ub = m;
    }
    return pair<D, int>(-f(deq[ub], x), id[ub]);
  }
  bool isright(pair<D, D>& a, pair<D, D>& b, D x) { return f(a, x) >= f(b, x); }
  bool check(pair<D, D>& a, pair<D, D>& b, pair<D, D>& c) {
    return (b.first - a.first) * (c.second - b.second) >=
           (b.second - a.second) * (c.first - b.first);
  }
  D f(pair<D, D>& p, int x) { return p.first * x + p.second; }
};
double Exp(double x, ll p) {
  double a = 1;
  while (p) {
    if (p & 1) a *= x;
    x *= x;
    p >>= 1;
  }
  return a;
}
int main() {
  int N;
  ll T;
  cin >> N >> T;
  struct Quest {
    double a, b, p;
  };
  V<Quest> qs;
  double QB = 0;
  for (int i = 0; i < (int)(N); i++) {
    double a, b, p;
    cin >> a >> b >> p;
    qs.push_back({a, b, p});
    QB = max(QB, p * b);
  }
  sort(qs.begin(), qs.end(),
       [&](const Quest& l, const Quest& r) { return l.p < r.p; });
  CHT cht(N);
  for (auto q : qs) {
    cht.add(q.p, q.p * q.a);
  }
  double d = 0;
  ll t = 0;
  while (true) {
    int who = cht.query(d).second;
    auto goNext = [&]() {
      double r = 1 - qs[who].p;
      double c = QB / qs[who].p - qs[who].a;
      V<double> exps;
      {
        for (int i = 0; i < (int)(60); i++) {
          if (t + (1LL << i) >= T) break;
          if (i == 0)
            exps.push_back(r);
          else
            exps.push_back(exps.back() * exps.back());
        }
      }
      int K = exps.size();
      for (int i = K - 1; i >= 0; i--) {
        if (t + (1LL << i) >= T) continue;
        double nd = (d - c) * exps[i] + c;
        if (cht.query(nd).second == who) d = nd, t += 1LL << i;
      }
      t++;
      d = (d - c) * r + c;
    };
    goNext();
    if (t == T) {
      printf("%.12f\n", T * QB - d);
      return 0;
    }
  }
}
