n,m=map(int,input().split()) abp=[map(int,input().split()) for _ in range(n)] a,b,p=[list(i) for i in zip(*abp)] dp=[[0 for j in range(m+1)] for i in range(2**n)] for i in range(2**n): for j in range(m+1): for k in range(n): if (i>>k)%2: if dp[i-2**k][j]+1/a[k]>dp[i][j]: dp[i][j]=dp[i-2**k][j]+1/a[k] if j: if (i>>k)%2: if (dp[i-2**k][j]+1/b[k])/p[k]+dp[i][j-1]*(1-1/p[k])>dp[i][j]: dp[i][j]=(dp[i-2**k][j]+1/b[k])/p[k]+dp[i][j-1]*(1-1/p[k]) print(dp[2**n-1][m])