#include <bits/stdc++.h>
using namespace std;
inline int gi() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + ch - 48;
    ch = getchar();
  }
  return x * f;
}
template <typename T>
inline bool Max(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
template <typename T>
inline bool Min(T &a, T b) {
  return b < a ? a = b, 1 : 0;
}
const int N = 1e5 + 7;
const double eps = 1e-12;
int n, len, tp, st[N];
long long t;
double a[N], b[N], p[N], M;
int dcmp(double x) {
  if (fabs(x) < eps) return 0;
  return x < 0 ? -1 : 1;
}
struct line {
  double k, b;
  int id;
  line() {}
  line(double k, double b, int id) : k(k), b(b), id(id) {}
  bool operator<(const line &rhs) const {
    if (dcmp(k - rhs.k) != 0) return dcmp(k - rhs.k) < 0;
    return dcmp(b - rhs.b) < 0;
  }
} l[N];
double X(int a, int b) { return (l[b].b - l[a].b) / (l[a].k - l[b].k); }
struct mat {
  double v[5][5];
  mat() { memset(v, 0, sizeof v); }
  void init() { memset(v, 0, sizeof v); }
  mat operator*(const mat &rhs) const {
    mat res;
    for (int i = 0; i <= 4; ++i)
      for (int j = 0; j <= 4; ++j)
        for (int k = 0; k <= 4; ++k) res.v[i][j] += v[i][k] * rhs.v[k][j];
    return res;
  }
} A, B[34], C;
mat Pow(mat a, long long b) {
  mat res;
  for (int i = 1; i <= 4; ++i) res.v[i][i] = 1;
  for (; b; b >>= 1, a = a * a)
    if (b & 1) res = res * a;
  return res;
}
int main() {
  scanf("%d%I64d\n", &n, &t);
  for (int i = 1; i <= n; ++i) {
    scanf("%lf%lf%lf", &a[i], &b[i], &p[i]);
    l[i] = line(p[i], p[i] * a[i], i);
    Max(M, b[i] * p[i]);
  }
  sort(l + 1, l + 1 + n);
  for (int i = 1; i <= n; ++i) {
    if (dcmp(l[i].k - l[i + 1].k) == 0) continue;
    l[++len] = l[i];
  }
  for (int i = 1; i <= len; ++i) {
    while (tp > 1 && dcmp(X(st[tp - 1], i) - X(st[tp], st[tp - 1])) <= 0) --tp;
    st[++tp] = i;
  }
  long long now = 0;
  double last_val = 0;
  B[0].v[1][0] = B[0].v[1][1] = B[0].v[2][0] = B[0].v[2][2] = B[0].v[3][2] =
      B[0].v[3][3] = 1;
  for (int i = 1; i <= tp && now ^ t; ++i) {
    double r = i == tp ? 1e100 : X(st[i], st[i + 1]);
    memset(A.v, 0, sizeof A.v);
    A.v[0][0] = last_val;
    A.v[0][1] = l[st[i]].b;
    A.v[0][2] = now * l[st[i]].k * M;
    A.v[0][3] = l[st[i]].k * M;
    B[0].v[0][0] = 1 - l[st[i]].k;
    if (now * M - A.v[0][0] > r) {
      continue;
    }
    for (int j = 1; j < 34; ++j) {
      B[j] = B[j - 1] * B[j - 1];
    }
    for (int j = 33; ~j; --j) {
      if (now + (1LL << j) >= t) {
        continue;
      }
      mat old = A;
      A = A * B[j];
      double x = (now + (1LL << j)) * M - A.v[0][0];
      if (x >= r) {
        A = old;
        continue;
      }
      now += 1LL << j;
    }
    ++now;
    A = A * B[0];
    last_val = A.v[0][0];
  }
  printf("%.15lf\n", last_val);
  return 0;
}
