#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <time.h>
#include <string>
#include <map>
#include <stack>
#include <vector>
#include <set>
#include <queue>
#define inf 0x3f3f3f3f
#define mod 1000000007
typedef long long ll;
using namespace std;
const int N=200005;
double m=1e7;
int q[N], sum[N];
struct man
{
double x,y,s;
}a[N];
int main()
{
int n;
scanf("%d",&n);
for(int i=1;i<=n;i++){
cin>>a[i].x>>a[i].y>>a[i].s;
}
double l=0,r=m,mid;
while(r-l>=1e-4){
mid=(l+r)/2;
bool flag=false;
a[0].y=0;double t=0;
for(int i=1;i<=n;i++){
if(a[i].s/mid+t<=a[i].x)t=a[i].x;
else if(a[i].s/mid+t>a[i].y){flag=true;break;}
else if(a[i].s/mid+t>a[i].x&&a[i].s/mid+t<=a[i].y)t=a[i].s/mid+t;
}
if(flag)l=mid;
else r=mid;
}
printf("%.2lf\n",mid);
return 0;
}