#include <bits/stdc++.h>
using namespace std;
struct pdd {
  long double first, second;
  int id;
  pdd() {}
  pdd(long double first, long double second, int id)
      : first(first), second(second), id(id) {}
};
int n, a[100100], tp, b[100100];
long double mx, pi[101000];
pdd sta[101000], g[101000];
long long T;
long double cal1(long double p, long double T) {
  return (pow(p, T) - 1) / (p - 1);
}
long double cal2(long double p, long double T) {
  return (cal1(p, T) - (T - 1) * pow(p, T) - 1) / (1 - p);
}
int chk(pdd a, pdd b, pdd c) {
  long double a1 = (b.second - a.second) / (a.first - b.first);
  long double a2 = (c.second - b.second) / (b.first - c.first);
  return a1 >= a2;
}
int cmp(pdd a, pdd b) {
  if (fabs(a.first - b.first) <= 1e-10) return a.second > b.second;
  return a.first < b.first;
}
long double trans(int x, long double ans, long long pos, long long nxt) {
  if (nxt == pos) return ans;
  long long X = nxt - pos;
  long double ai = a[sta[x].id], bi = b[sta[x].id], P = pi[sta[x].id],
              Q = 1 - P;
  long double val = pow(Q, X) * ans + ai * P * cal1(Q, X);
  val += mx * P * nxt * cal1(Q, X);
  val -= mx * P * cal2(Q, X);
  return val;
}
int main() {
  scanf("%d%lld", &n, &T);
  mx = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%d%d%Lf", &a[i], &b[i], &pi[i]);
    mx = max(mx, b[i] * pi[i]);
    g[i] = pdd(pi[i], pi[i] * a[i], i);
  }
  sort(g + 1, g + n + 1, cmp);
  for (int i = 1; i <= n; ++i) {
    if (tp && fabs(sta[tp].first - g[i].first) <= 1e-10) continue;
    while (tp >= 2 && chk(sta[tp - 1], sta[tp], g[i])) tp--;
    sta[++tp] = g[i];
  }
  long double ans = 0;
  for (int i = 1; i <= n; ++i) ans = max(ans, pi[i] * a[i]);
  long long pos = 0, x = 1;
  while (pos < T) {
    if (x == tp) {
      ans = trans(tp, ans, pos, T - 1);
      break;
    } else {
      long long l = pos + 1, r = T - 1, nxt = pos;
      long double X = (sta[x].second - sta[x + 1].second) /
                      (sta[x + 1].first - sta[x].first);
      while (l <= r) {
        long long mid = l + r >> 1;
        long double d = -trans(x, ans, pos, mid - 1) + mx * mid;
        if (d <= X)
          nxt = mid, l = mid + 1;
        else
          r = mid - 1;
      }
      ans = trans(x, ans, pos, nxt);
      pos = nxt;
      x++;
    }
  }
  printf("%.15Lf", ans);
}
