#include <bits/stdc++.h>
using namespace std;
vector<vector<double>> mul(vector<vector<double>> A, vector<vector<double>> B) {
  vector<vector<double>> C(A.size(), vector<double>(B[0].size()));
  for (size_t i = 0; i < C.size(); i++) {
    for (size_t j = 0; j < C[i].size(); j++) {
      for (size_t k = 0; k < A[0].size(); k++) {
        C[i][j] += A[i][k] * B[k][j];
      }
    }
  }
  return C;
}
const int MX = 100005;
const double EPS = 1e-20;
const double INF = 1e20;
struct Line {
  double k, b;
  double a, p;
  double L, R;
} lines[MX];
bool operator<(Line a, Line b) {
  if (abs(a.k - b.k) < EPS) {
    return a.b > b.b;
  }
  return a.k < b.k;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  long long T;
  cin >> n >> T;
  double M = 0;
  for (int i = 0; i < n; i++) {
    double a, b, p;
    cin >> a >> b >> p;
    M = max(M, b * p);
    lines[i].k = p;
    lines[i].b = p * a;
    lines[i].a = a;
    lines[i].p = p;
  }
  sort(lines, lines + n);
  int sz = 0;
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      lines[i].L = -INF;
      lines[i].R = INF;
      ;
      sz++;
      continue;
    }
    if (abs(lines[i].k - lines[sz - 1].k) < EPS) continue;
    double X;
    while (true) {
      X = (lines[i].b - lines[sz - 1].b) / (lines[sz - 1].k - lines[i].k);
      if (X <= lines[sz - 1].L)
        sz--;
      else
        break;
    }
    lines[sz - 1].R = X;
    lines[sz] = lines[i];
    lines[sz].L = X;
    lines[sz].R = INF;
    sz++;
  }
  double dp = 0;
  long long t = 0;
  for (int i = 0; i < sz; i++) {
    if (t * M - dp >= lines[i].R || t >= T) continue;
    vector<vector<double>> X[35];
    X[0] = {{1 - lines[i].p, lines[i].p * M, lines[i].p * lines[i].a},
            {0, 1, 1},
            {0, 0, 1}};
    for (int j = 0; j < 34; j++) {
      X[j + 1] = mul(X[j], X[j]);
    }
    for (long long j = 34; j >= 0; j--) {
      long long new_t = t + (1LL << j);
      if (new_t >= T) continue;
      double new_dp = X[j][0][0] * dp + X[j][0][1] * t + X[j][0][2];
      if (new_t * M - new_dp < lines[i].R) {
        dp = new_dp;
        t = new_t;
      }
    }
    dp = X[0][0][0] * dp + X[0][0][1] * t + X[0][0][2];
    t++;
  }
  cout << setprecision(15) << fixed << dp;
}
