#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;
  }
  int now = 1;
  long long cnt = 0;
  for (int now = 1; now <= tp && cnt ^ t; ++now) {
    double R = cnt * M - A.v[1][1];
    while (now < tp && X(st[now], st[now + 1]) <= R) ++now;
    int i = st[now];
    R = X(st[now], st[now + 1]);
    B[0].init();
    B[0].v[1][1] = 1 - l[i].k;
    B[0].v[2][1] = l[i].k;
    B[0].v[2][2] = B[0].v[3][1] = B[0].v[3][3] = B[0].v[4][2] = B[0].v[4][4] =
        1;
    A.v[1][3] = l[i].b, A.v[1][4] = M;
    for (int i = 1; i <= 33; ++i) B[i] = B[i - 1] * B[i - 1];
    for (int i = 33; ~i; --i)
      if (t - cnt > (1ll << i)) {
        C = A * B[i];
        if (now == tp || dcmp((cnt + (1ll << i)) * M - C.v[1][1] - R) < 0)
          A = C, cnt += (1ll << i);
      }
    cnt++, A = A * B[0];
  }
  printf("%.13lf\n", A.v[1][1]);
  return 0;
}
