from fractions import Fraction n,m = map(int,input().split()) abp = [tuple(map(int,input().split())) for _ in range(n)] ans = 0; f = [] for a,b,p in abp: ans += 1/a if a>b: f.append((Fraction(a-b,a*b*p),a,b,p)) f.sort(reverse=True); l = len(f); s = [0]*(l+1) for i in range(l): s[i+1] = s[i]-1/f[i][1]+1/f[i][2] dp = [[0]*(m+1) for _ in range(l+1)]; dp[0][0] = 1 for i in range(l): _,a,b,p = f[i] for j in range(m): dp[i+1][j] += dp[i][j]/p dp[i][j+1] += dp[i][j]*(1-1/p) for i in range(l): ans += s[i]*dp[i][m] for j in range(m): ans += s[l]*dp[l][j] print(ans)