#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-14;
struct point {
  double x, y;
} g[100002];
struct Matrix {
  double a[4][4];
  long long n, m;
} ans, s[40];
Matrix operator*(Matrix a, Matrix b) {
  Matrix c;
  memset(c.a, 0, sizeof(c.a));
  c.n = a.n;
  c.m = b.m;
  for (long long i = 1; i <= a.n; i++) {
    for (long long j = 1; j <= b.m; j++) {
      for (long long k = 1; k <= a.m; k++) c.a[i][j] += a.a[i][k] * b.a[k][j];
    }
  }
  return c;
}
long long n, i, q[100002], head, tail;
long long t;
double p[100002], maxx, a[100002], b[100002];
long long my_comp(const point &a, const point &b) {
  if (fabs(a.x - b.x) < eps) return a.y > b.y;
  return a.x < b.x;
}
double calc(long long a, long long b) {
  return (g[a].y - g[b].y) / (g[a].x - g[b].x);
}
double get(double k, long long x) { return g[x].x * k + g[x].y; }
signed main() {
  scanf("%lld%lld", &n, &t);
  for (i = 1; i <= n; i++) {
    scanf("%lf%lf%lf", &a[i], &b[i], &p[i]);
    g[i].x = p[i], g[i].y = p[i] * a[i];
    maxx = max(maxx, p[i] * b[i]);
  }
  sort(g + 1, g + n + 1, my_comp);
  for (i = 1; i <= n; i++) {
    if (g[i].x - g[i - 1].x < eps) continue;
    while (tail - head > 1 &&
           calc(i, q[tail - 1]) - calc(q[tail - 1], q[tail - 2]) > eps)
      tail--;
    q[tail++] = i;
  }
  ans.n = 1;
  ans.m = 3;
  ans.a[1][3] = 1;
  for (i = 0; i <= 34; i++) s[i].n = s[i].m = 3;
  double k = 0;
  long long pos = 0;
  while (1) {
    while (tail - head > 1 && calc(q[head + 1], q[head]) > -k) head++;
    long long j = q[head];
    s[0].a[1][1] = 1 - g[j].x;
    s[0].a[2][1] = g[j].x * maxx;
    s[0].a[3][1] = g[j].y;
    s[0].a[2][2] = s[0].a[3][2] = s[0].a[3][3] = 1;
    for (i = 1; i <= 34; i++) s[i] = s[i - 1] * s[i - 1];
    for (i = 34; i >= 0; i--) {
      if (pos + (1LL << i) >= t) continue;
      Matrix tmp = ans * s[i];
      double k1 = maxx * tmp.a[1][2] - tmp.a[1][1];
      if (head == tail - 1 || get(k1, q[head]) > get(k1, q[head + 1])) {
        pos += (1LL << i);
        ans = tmp;
      }
    }
    ans = ans * s[0];
    pos++;
    k = maxx * ans.a[1][2] - ans.a[1][1];
    if (pos == t) break;
  }
  printf("%.8lf\n", ans.a[1][1]);
  return 0;
}
