#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for(int i = a;i<n;i++)
#define ll long long

double intersection(pair<int,int> a, pair<int,int> b){
	//assert(a!=b);
	//assert(a.second!=b.second);
	return ((double) (a.second * a.first - b.second * b.first)) / (a.second - b.second);
}

int main(){
    iostream::sync_with_stdio(false);
    cout<<fixed<<setprecision(4);
	int n;
	while(1){
		cin >> n;
		if(!n) return 0;
		if(n==1) {
			cout << 0 << endl;
			continue;
		}
		//cout << "---------" << endl;
		set<pair<int,int>> asdf;
		rep(i,0,n){
			int aa, bb;
			cin >> aa >> bb;
			asdf.insert({aa,bb});
		}
		vector<pair<int,int>> a;
		for(auto x : asdf){
			a.push_back(x);
		}
		n = a.size();
		if(n==1) {
			cout << 0 << endl;
			continue;
		}
		vector<pair<int,double>> upper; //primka, pocatecni cas existence
		upper.push_back({0, 0.0});
		rep(i, 1, n){
			if(a[i].second <= a[i-1].second) continue; //nikdy nebude maximum, je moc pomaly
			int from = 0, to = upper.size()-1;
			int best = upper.size();
			while(from <= to){
				int avg = (from+to)/2;
				if(intersection(a[i], a[upper[avg].first])<upper[avg].second){ //protina se pred - odstranime
					best = min(best, avg);
					to = avg - 1;
				} else {
					from = avg + 1;
				}
			}
			upper.resize(best);
			upper.push_back({i, intersection(a[i], a[upper[best-1].first])});
		}
		//------------------LOWER-----------------
		vector<pair<int,double>> lower; //primka, pocatecni cas existence
		lower.push_back({n-1, 0.0}); //druhe se nepouzije?
		for(int i = n-2;i>=0;i--){
			if(a[i].second >= a[i+1].second) continue; //nikdy nebude minimum, je moc rychly
			int from = 0, to = lower.size()-1;
			int best = lower.size();
			while(from <= to){
				int avg = (from + to) / 2;
				if(intersection(a[i], a[lower[avg].first])<lower[avg].second){ //protina se pred - odstranime
					best = min(best, avg);
					to = avg - 1;
				} else {
					from = avg + 1;
				}
			}
			lower.resize(best);
			lower.push_back({i, intersection(a[i], a[lower[best-1].first])});
		}
		/*for(auto x : upper) cout << x.first << " " <<x.second << endl;
		cout << endl;
		for(auto x : lower) cout << x.first << " " <<x.second << endl;
		cout << endl;*/
		int ui = 0, li = 0;
		int mint = a[n-1].first;
		double best = 1e15;
		vector<double> events;
		for(auto x : upper) events.push_back(x.second);
		for(auto x : lower) events.push_back(x.second);
		events.push_back(mint);
		sort(events.begin(), events.end());
		for(auto cur : events) {
			if(cur<mint) continue;
			while(ui<upper.size()-1 && upper[ui+1].second<=cur) ui++;
			while(li<lower.size()-1 && lower[li+1].second<=cur) li++;

			double val = a[upper[ui].first].second * (cur - a[upper[ui].first].first);
			val -= a[lower[li].first].second * (cur - a[lower[li].first].first);
			best = min(best, val);
		}
		cout << best << endl;
	}
    return 0;
}