#include <bits/stdc++.h>
using namespace std;
int n;
long long t;
struct hh {
  double a, b;
  bool operator<(hh x) const { return a < x.a; }
} sk[100005];
double w;
double jx[3][3], a[3];
void xc(double a[3], double b[3][3]) {
  double c[3];
  for (int i = 0; i < 3; ++i) c[i] = 0;
  for (int i = 0; i < 3; ++i)
    for (int j = 0; j < 3; ++j) c[j] += a[i] * b[i][j];
  for (int i = 0; i < 3; ++i) a[i] = c[i];
}
void Xc(double a[3][3], double b[3][3]) {
  double c[3][3];
  for (int i = 0; i < 3; ++i)
    for (int j = 0; j < 3; ++j) c[i][j] = 0;
  for (int i = 0; i < 3; ++i)
    for (int j = 0; j < 3; ++j)
      for (int k = 0; k < 3; ++k) c[i][k] += a[i][j] * b[j][k];
  for (int i = 0; i < 3; ++i)
    for (int j = 0; j < 3; ++j) a[i][j] = c[i][j];
}
double query(long long s, long long t, double ans, int p) {
  if (t == s) return ans;
  jx[0][0] = 1 - sk[p].a;
  jx[0][1] = jx[0][2] = 0;
  jx[1][0] = w * sk[p].a;
  jx[1][1] = 1;
  jx[1][2] = 0;
  jx[2][0] = sk[p].b;
  jx[2][1] = jx[2][2] = 1;
  t -= s;
  a[0] = ans;
  a[1] = s;
  a[2] = 1;
  while (t) {
    if (t & 1) xc(a, jx);
    Xc(jx, jx);
    t >>= 1;
  }
  return a[0];
}
int main() {
  scanf("%d%lld", &n, &t);
  for (int i = 1; i <= n; ++i) {
    double a, b, c;
    scanf("%lf%lf%lf", &a, &b, &c);
    w = max(w, b * c);
    sk[i].a = c;
    sk[i].b = a * c;
  }
  sort(sk + 1, sk + n + 1);
  int r = 0;
  for (int i = 1; i <= n; ++i) {
    while (r > 1 && (sk[i].b - sk[r].b) * (sk[r].a - sk[r - 1].a) >=
                        (sk[r].b - sk[r - 1].b) * (sk[i].a - sk[r].a))
      --r;
    sk[++r] = sk[i];
  }
  long long tp = 0;
  double ans = 0;
  int pr = 1;
  while (tp < t && pr < r) {
    long long L = tp + 1, R = t, s1 = tp;
    double s2 = ans;
    while (L <= R) {
      long long mid = (L + R) >> 1;
      double w1 = query(tp, mid - 1, ans, pr), w2 = w1;
      w1 += ((mid - 1) * w - w1) * sk[pr].a + sk[pr].b;
      w2 += ((mid - 1) * w - w2) * sk[pr + 1].a + sk[pr + 1].b;
      if (w1 >= w2)
        L = mid + 1, s1 = mid, s2 = w1;
      else
        R = mid - 1;
    }
    ++pr;
    tp = s1;
    ans = s2;
  }
  printf("%.13lf\n", query(tp, t, ans, pr));
}
