#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("no-stack-protector")
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using str = string;
using pll = pair<ll, ll>;
using c_type = ld;
using point = complex<c_type>;
istream& operator>>(istream& cin, point& p) {
  c_type x, y;
  cin >> x >> y;
  p.real(x);
  p.imag(y);
  return cin;
}
constexpr ll INF = 0x7fffffffffffffff;
constexpr ll BASE = 1000000007;
template <class T>
constexpr T max() {
  return std::numeric_limits<T>::max();
}
template <class T>
constexpr T min() {
  return std::numeric_limits<T>::min();
}
template <class T>
void chMax(T& a, T b) {
  if (a < b) a = b;
}
template <class T>
void chMin(T& a, T b) {
  if (b < a) a = b;
}
inline ll divUp(ll a, ll b) { return (a + b - 1) / b; }
void solve() {
  ll n;
  cin >> n;
  if (n <= 1) {
    cout << "0\n";
    return;
  }
  vector<point> a(n + 1);
  for (ll i = 1; i <= n; ++i) cin >> a[i];
  ++n;
  ld aldist = 0;
  for (ll i = 0; i + 1 < n; ++i) {
    aldist += abs(a[i] - a[i + 1]);
  }
  ld v = max(abs(a[1] - a.back()) / abs(a.front() - a.back()),
             abs(a[a.size() - 2] - a.front()) / abs(a.front() - a.back()));
  ld accdist = abs(a[0] - a[1]);
  for (ll i = 1; i + 1 < a.size(); ++i) {
    ld fldist = abs(a[i] - a[i + 1]);
    ld ldist = abs(a[i] - a.front());
    ld frdist = aldist - accdist + abs(a[i] - a[i - 1]);
    ld rdist = abs(a[i] - a.back());
    chMax(v, min(fldist / ldist, frdist / rdist));
    accdist += fldist;
  }
  cout << v << '\n';
}
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  cout << setprecision(10) << fixed;
  solve();
}
