#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; string X,Y; auto comp = [&](const string &a,const string &b) -> int { if(a == "") return 1; for(int i=0; i b.at(i)) return 0; else if(a.at(i) < b.at(i)) return 1; } return -1; }; for(int i=0; i> s >> t; string x = "",y = ""; string a = ""; string b = ""; bool under1 = false; for(auto c : s){ if(c == '.'){under1 = true; continue;} if(under1) b += c; else a += c; } int left = 10-a.size(); while(left--) x += '0'; x += a+b; left = 16-b.size(); while(left--) x += '0'; a = "",b = ""; under1 = false; for(auto c : t){ if(c == '.'){under1 = true; continue;} if(under1) b += c; else a += c; } left = 10-a.size(); while(left--) y += '0'; y += a+b; left = 16-b.size(); while(left--) y += '0'; int k = comp(X,x); if(k == 0) continue; if(k == 1) X = x,Y = y; else if(comp(Y,y) == 1) X = x,Y = y; } string X2 = "",Y2 = ""; for(int i=0; i> s >> t; string x = "",y = ""; string a = ""; string b = ""; bool under1 = false; for(auto c : s){ if(c == '.'){under1 = true; continue;} if(under1) b += c; else a += c; } int left = 10-a.size(); while(left--) x += '0'; x += a+b; left = 16-b.size(); while(left--) x += '0'; a = "",b = ""; under1 = false; for(auto c : t){ if(c == '.'){under1 = true; continue;} if(under1) b += c; else a += c; } left = 10-a.size(); while(left--) y += '0'; y += a+b; left = 16-b.size(); while(left--) y += '0'; int k = comp(X2,x); if(k == 0) continue; if(k == 1) X2 = x,Y2 = y; else if(comp(Y2,y) == 1) X2 = x,Y2 = y; } cout << fixed << setprecision(20) << stold(X2)/stold(X) << endl; }