#include <bits/stdc++.h>
using namespace std;
const double inf = 1e20;
const double eps = 1e-10;
struct Line {
  double k, b;
  Line() = default;
  Line(double k_, double b_) : k(k_), b(b_) {}
};
bool operator<(const Line& a, const Line& b) {
  if (fabs(a.k - b.k) < eps) {
    return a.b + eps < b.b;
  }
  return a.k < b.k;
}
bool operator==(const Line& a, const Line& b) { return !(a < b) && !(b < a); }
vector<double> operator*(const vector<vector<double> >& mat,
                         const vector<double>& vec) {
  assert(vec.size() == mat[0].size());
  vector<double> result(vec.size(), 0);
  for (size_t i = 0; i < mat.size(); ++i) {
    for (size_t j = 0; j < mat[i].size(); ++j) {
      result[i] += mat[i][j] * vec[j];
    }
  }
  return result;
}
vector<vector<double> > operator*(const vector<vector<double> >& a,
                                  const vector<vector<double> >& b) {
  assert(a.size() == b.size());
  vector<vector<double> > result(a.size());
  for (size_t i = 0; i < a.size(); ++i) {
    result[i].assign(b[0].size(), 0);
    for (size_t j = 0; j < b[0].size(); ++j) {
      for (size_t k = 0; k < a[i].size(); ++k) {
        result[i][j] += a[i][k] * b[k][j];
      }
    }
  }
  return result;
}
template <class S, class T>
ostream& operator<<(ostream& st, pair<S, T> p) {
  st << "(" << p.first << "," << p.second << ")";
  return st;
}
ostream& operator<<(ostream& st, const Line& l) {
  st << "(k=" << l.k << ", b=" << l.b << ")";
}
template <class T>
ostream& operator<<(ostream& st, vector<T> v) {
  st << "[";
  for (size_t i = 0; i < v.size(); ++i) {
    if (i != 0) {
      st << ", ";
    }
    st << v[i];
  }
  st << "]";
  return st;
}
double calc_x(const Line& l_a, const Line& l_b) {
  double x = -(l_a.b - l_b.b) / (l_a.k - l_b.k);
  return x;
}
vector<vector<double> > bin_pow(const vector<vector<double> >& base,
                                long long degree) {
  vector<vector<double> > result;
  if (degree == 0) {
    result.resize(base.size());
    for (size_t i = 0; i < base.size(); ++i) {
      result[i].assign(base[i].size(), 0);
      result[i][i] = 1;
    }
  } else if (degree % 2 == 1) {
    result = bin_pow(base, degree - 1) * base;
  } else {
    vector<vector<double> > buffer = bin_pow(base, degree / 2);
    result = buffer * buffer;
  }
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  long long t;
  cin >> n >> t;
  vector<double> a(n), b(n), p(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i] >> b[i] >> p[i];
  }
  double best_gain = 0;
  for (int i = 0; i < n; ++i) {
    best_gain = max(best_gain, b[i] * p[i]);
  }
  vector<Line> lines;
  for (int i = 0; i < n; ++i) {
    lines.push_back(Line(p[i], a[i] * p[i]));
  }
  sort(lines.begin(), lines.end());
  for (int i = 1; i < n; ++i) {
    if (fabs(lines[i - 1].k - lines[i].k) < eps) {
      double value = max(lines[i - 1].b, lines[i].b);
      lines[i - 1].b = value;
      lines[i].b = value;
    }
  }
  n = unique(lines.begin(), lines.end()) - lines.begin();
  lines.resize(n);
  vector<double> line_ids{0};
  vector<double> end_points;
  for (int i = 1; i < n; ++i) {
    while (line_ids.size() >= 2) {
      const Line& cur_line = lines[i];
      const Line& last_line = lines[line_ids.back()];
      double current_x = calc_x(cur_line, last_line);
      double prev_x = end_points.back();
      if (current_x + eps < prev_x) {
        line_ids.pop_back();
        end_points.pop_back();
      } else {
        break;
      }
    }
    double new_x = calc_x(lines[line_ids.back()], lines[i]);
    line_ids.push_back(i);
    end_points.push_back(new_x);
  }
  end_points.push_back(inf);
  long long cur_time = 0;
  double cur_me = 0;
  for (size_t i = 0; i < lines.size() && cur_time < t; ++i) {
    const Line& cur_line = lines[line_ids[i]];
    double cur_x = best_gain * cur_time - cur_me;
    double cur_limit = end_points[i];
    if (cur_x - eps > cur_limit) {
      continue;
    }
    vector<double> vec{cur_me, static_cast<double>(cur_time), 1};
    vector<vector<double> > base{
        {1 - cur_line.k, cur_line.k * best_gain, cur_line.b},
        {0, 1, 1},
        {0, 0, 1}};
    int max_power = 40;
    vector<long long> two_pow(max_power, 1);
    vector<vector<vector<double> > > base_pow(max_power, base);
    for (int st = 1; st < max_power; ++st) {
      two_pow[st] = two_pow[st - 1] * 2LL;
      base_pow[st] = base_pow[st - 1] * base_pow[st - 1];
    }
    for (int st = max_power - 1; st >= 0; --st) {
      long long next_time = cur_time + two_pow[st];
      if (next_time < t) {
        vector<double> next_vec = base_pow[st] * vec;
        double next_me = next_vec[0];
        double next_x = best_gain * next_time - next_me;
        if (next_x - eps < cur_limit) {
          cur_time = next_time;
          cur_me = next_me;
          vec = next_vec;
        }
      }
    }
    ++cur_time;
    vector<double> next_vec = base * vec;
    cur_me = next_vec[0];
  }
  cout << fixed << setprecision(12);
  cout << cur_me << endl;
  return 0;
}
