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: if p>1: f.append((Fraction(a-b,a*b*p),a,b,p)) else: ans += 1/b-1/a 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,(_,_,_,p) in enumerate(f): 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)