#include <bits/stdc++.h>
using namespace std;
inline int cmp(long double x, long double y) {
  if (x == y) return 0;
  return (x < y) ? -1 : 1;
}
struct Point {
  long double x, y;
  Point() {}
  Point(long double a, long double b) : x(a), y(b) {}
  Point operator-(Point b) { return Point(x - b.x, y - b.y); }
  bool operator<(const Point &b) const {
    return (cmp(y, b.y) != 0) ? (cmp(y, b.y) > 0) : (cmp(x, b.x) > 0);
  }
};
long double cross(Point x, Point y) { return x.x * y.y - x.y * y.x; }
Point p[100005], hull[100005];
int st[100005];
int build(int n) {
  sort(p + 1, p + n + 1);
  int top = 0;
  for (int i = 1; i <= n; i++) {
    if (top && (p[i].y == p[st[top]].y || p[i].x < p[st[top]].x)) continue;
    while (top > 1 &&
           cmp(cross(p[i] - p[st[top]], p[st[top]] - p[st[top - 1]]), 0) <= 0)
      top--;
    st[++top] = i;
  }
  for (int i = 1; i <= top; i++) hull[i] = p[st[i]];
  return top;
}
struct Matrix {
  long double num[3][3];
  int n, m;
  Matrix() {}
  Matrix(int a, int b) : n(a), m(b) { memset(num, 0, sizeof(num)); }
};
Matrix operator*(Matrix &a, Matrix &b) {
  Matrix c(a.n, b.m);
  for (int i = 0; i < c.n; i++)
    for (int j = 0; j < c.m; j++)
      for (int k = 0; k < a.m; k++) c.num[i][j] += a.num[i][k] * b.num[k][j];
  return c;
}
long double maxn;
Matrix now[40];
void pre(int n, long double x, int y, long long t) {
  now[0] = Matrix(3, 3);
  now[0].num[0][0] = 1 - hull[y].x;
  now[0].num[0][1] = hull[y].x * maxn;
  now[0].num[0][2] = hull[y].y;
  now[0].num[1][1] = now[0].num[1][2] = now[0].num[2][2] = 1;
  for (int i = 1; i <= n; i++) now[i] = now[i - 1] * now[i - 1];
}
inline long double trans(long double x, int y, long long t) {
  return (1 - hull[y].x) * x + hull[y].y + hull[y].x * maxn * t;
}
int main() {
  int n;
  long long m;
  scanf("%d%lld", &n, &m);
  for (int i = 1; i <= n; i++) {
    long double x, y, z;
    scanf("%Lf%Lf%Lf", &x, &y, &z);
    p[i] = Point(z, x * z);
    maxn = max(maxn, y * z);
  }
  int k = build(n);
  long double ans = 0;
  int lx = 1;
  for (long long l = 1; l <= m; l++) {
    while (lx < k && cmp(trans(ans, lx, l - 1), trans(ans, lx + 1, l - 1)) <= 0)
      lx++;
    pre(34, ans, lx, l - 1);
    Matrix fir(3, 1);
    fir.num[0][0] = ans;
    fir.num[1][0] = l - 1;
    fir.num[2][0] = 1;
    for (int j = 34; j >= 0; j--)
      if (l + (1LL << j) <= m) {
        Matrix u = now[j] * fir;
        long double t = u.num[0][0];
        if (lx == k || cmp(trans(t, lx, l - 1 + (1LL << j)),
                           trans(t, lx + 1, l - 1 + (1LL << j))) >= 0) {
          l += (1LL << j);
          fir = u;
        }
      }
    fir = now[0] * fir;
    ans = fir.num[0][0];
  }
  printf("%.12Lf\n", ans);
  return 0;
}
