#include<bits/stdc++.h>
#define f1(i, n) for(ll i=1;i<=n;++i)
#define f0(i, n) for(ll i=0;i<n;++i)
#define ull unsigned long long
#define ll long long
#define rev(a) reverse(a.begin(),a.end())
#define all(x) x.begin(),x.end()
#define so(A, n) sort(A+1, A+n+1)
using namespace std;
const int maxn = 200010;
const int N = 1e5 + 1;
pair<double, pair<double, double>> A[N], B[N];
int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int n;
	cin >> n;
	f1(i, n) {
		cin >> A[i].second.first >> A[i].second.second;
		if (A[i].second.first == 0 || A[i].second.second == 0) {
			A[i].first = max(abs(A[i].second.first), abs(A[i].second.second));
		}
		else{
			A[i].first = sqrt(A[i].second.first * A[i].second.first + A[i].second.second * A[i].second.second);
		}
	}
	f1(i, n) {
		cin >> B[i].second.first >> B[i].second.second;
		if (B[i].second.first == 0 || B[i].second.second == 0) {
			B[i].first = max(abs(B[i].second.first), abs(B[i].second.second));
		}
		else{
			B[i].first = sqrt(B[i].second.first * B[i].second.first + B[i].second.second * B[i].second.second);
		}
	}
	sort(B + 1, B + n + 1);
	sort(A + 1, A + n + 1);
	// f1(i, n) {
	// 	cout << A[i].first << " " << A[i].second.first << " " << A[i].second.second;
	// 	cout<<endl;
	// }
	// f1(i, n) {
	// 	cout << B[i].first << " " << B[i].second.first << " " << B[i].second.second;
	// 	cout<<endl;
	// }
	f1(i, n) {
		int it = upper_bound(B + 1, B + n + 1, make_pair(A[i].first, make_pair((double)LLONG_MAX, (double)LLONG_MAX))) - B - 1;
		if(it == i){
			cout<<fixed<<setprecision(6)<<A[i].first;
			return 0;
		}
	}

	return 0;
}
