#include<bits/stdc++.h>
#define int long long
#define double long double
using namespace std;
const int N=2e5+5;
struct qw{
int a,b,c;
}x[N];
int n;
double l=0,r=2147483647,mid=0;
inline int read();
inline bool check(double);
signed main()
{
n=read();
for(int i=1;i<=n;i++) {x[i].a=read(); x[i].b=read(); x[i].c=read();}
while(r-l>0.00001)
{
mid=(l+r)/2.0;
if(check(mid))
r=mid;
else
l=mid;
}
printf("%0.2Lf",r);
return false;
}
inline bool check(double m)
{
double time=0.0;
for(int i=1;i<=n;i++)
{
time+=x[i].c/m;
if(time>x[i].b)
return 0;
if(time<x[i].a)
time=x[i].a;
}
return 1;
}
inline int read()
{
int q=1,x=0;char ch=getchar();
while(ch<'0' or ch>'9') {if(ch=='-') q=-1; ch=getchar();}
while(ch>='0' and ch<='9') {x=x*10+ch-'0';ch=getchar();}
return q*x;
}