#include <bits/stdc++.h>
using namespace std;
const int max_n = 100111, inf = 1000111222;
int n, a[max_n], b[max_n];
long double p[max_n], best = 0, ans = 0;
long long t;
long double get(int a, long double p) {
long double res = 0, cur = 1;
long double q = 1 - p;
res = (a + t * best) * (1 - pow(q, t));
res -= p * best * (pow(q, t) * (t * q - t - 1) + 1) / (q - 1) / (q - 1);
return res;
for (int i = 1; i <= t; ++i) {
res -= cur * p * i * best;
cur *= (1 - p);
}
return res;
}
int main() {
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
scanf("%d%lld", &n, &t);
for (int i = 0; i < n; ++i) {
double x;
scanf("%d%d%lf", &a[i], &b[i], &x);
p[i] = x;
best = max(best, p[i] * b[i]);
}
for (int i = 0; i < n; ++i) {
long double res = get(a[i], p[i]);
ans = max(ans, res);
}
cout << fixed << setprecision(20) << ans << "\n";
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiAKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKIApjb25zdCBpbnQgbWF4X24gPSAxMDAxMTEsIGluZiA9IDEwMDAxMTEyMjI7CiAKaW50IG4sIGFbbWF4X25dLCBiW21heF9uXTsKbG9uZyBkb3VibGUgcFttYXhfbl0sIGJlc3QgPSAwLCBhbnMgPSAwOwpsb25nIGxvbmcgdDsKIApsb25nIGRvdWJsZSBnZXQoaW50IGEsIGxvbmcgZG91YmxlIHApIHsKICAgIGxvbmcgZG91YmxlIHJlcyA9IDAsIGN1ciA9IDE7CiAgICBsb25nIGRvdWJsZSBxID0gMSAtIHA7CiAgICByZXMgPSAoYSArIHQgKiBiZXN0KSAqICgxIC0gcG93KHEsIHQpKTsKICAgIHJlcyAtPSBwICogYmVzdCAqIChwb3cocSwgdCkgKiAodCAqIHEgLSB0IC0gMSkgKyAxKSAvIChxIC0gMSkgLyAocSAtIDEpOwogICAgcmV0dXJuIHJlczsKICAgIGZvciAoaW50IGkgPSAxOyBpIDw9IHQ7ICsraSkgewogICAgICAgIHJlcyAtPSBjdXIgKiBwICogaSAqIGJlc3Q7CiAgICAgICAgY3VyICo9ICgxIC0gcCk7CiAgICB9CiAgICByZXR1cm4gcmVzOwp9CiAKaW50IG1haW4oKSB7CiAgICAvL2ZyZW9wZW4oImlucHV0LnR4dCIsICJyIiwgc3RkaW4pOwogICAgLy9mcmVvcGVuKCJvdXRwdXQudHh0IiwgInciLCBzdGRvdXQpOwogICAgc2NhbmYoIiVkJWxsZCIsICZuLCAmdCk7CiAgICBmb3IgKGludCBpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgIGRvdWJsZSB4OwogICAgICAgIHNjYW5mKCIlZCVkJWxmIiwgJmFbaV0sICZiW2ldLCAmeCk7CiAgICAgICAgcFtpXSA9IHg7CiAgICAgICAgYmVzdCA9IG1heChiZXN0LCBwW2ldICogYltpXSk7CiAgICB9CiAgICBmb3IgKGludCBpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgIGxvbmcgZG91YmxlIHJlcyA9IGdldChhW2ldLCBwW2ldKTsKICAgICAgICBhbnMgPSBtYXgoYW5zLCByZXMpOwogICAgfQogICAgY291dCA8PCBmaXhlZCA8PCBzZXRwcmVjaXNpb24oMjApIDw8IGFucyA8PCAiXG4iOwogICAgcmV0dXJuIDA7Cn0=