// editor5
#include <iostream>
#include <string>
using namespace std;

int main()
{

    float d, f, td = 0.0, tf = 0.0;
    
    int n;
    
    int fl = 0;
    
    cin >> n;
    if(!(n>=1 && n<=50))
    return 0;
    
    string s;
    
    
    for(int i=0;i<n;i++)
    {
        cin >> d >> f;
        
        if(!(d>0 && d<=1000))
        fl = 1;
        if(!(f>0 && f<=500))
        fl = 2;
        
        td += d;
        tf += f;
    }
    
    if(fl == 1)
    {
        cout << "Invalid Distance";
        return 0;
    }
    if(fl == 2)
    {
        cout << "Invalid Fuel";
        return 0;
    }
    if(fl == 0)
    {
        cout << fixed << setprecision(2) << td/tf;
    }
   
}