#include <iostream>
#include <algorithm>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <vector>
#include <queue>
#include <cmath>
#include <complex>
#include <functional>
#include <numeric>
#include <iomanip>
#include <cassert>
#include <random>
#include <chrono>

/* #include <atcoder/all> */
/* using namespace atcoder; */
using namespace std;

void debug_out(){ cout << "\n"; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cout << H << " ";
  debug_out(T...);
}
#ifdef _DEBUG
#define debug(...) debug_out(__VA_ARGS__)
#else
#define debug(...)
#endif

#define SPBR(w, n) std::cout<<(w + 1 == n ? '\n' : ' ');
#define YES cout << "YES" << endl
#define Yes cout << "Yes" << endl
#define NO cout << "NO" << endl
#define No cout << "No" << endl
#define ALL(i) (i).begin(), (i).end()
#define FOR(i, a, n) for(int i=(a);i<(n);++i)
#define RFOR(i, a, n) for(int i=(n)-1;i>=(a);--i)
#define REP(i, n) for(int i=0;i<int(n);++i)
#define RREP(i, n) for(int i=int(n)-1;i>=0;--i)
#define IN(a, x, b) (a<=x && x<b)
#define OUT(a, x, b) (x<a || b<=x)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

#define int ll
using ll = long long;
using ull = unsigned long long;
using ld = long double;
const ll MOD = 1000000007;
/* const ll MOD = 998244353; */
const ll INF = 1ll<<60;
const double PI = acos(-1);

struct INIT { INIT(){
  cin.tie(0); ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
}}INIT;

void f(ld x, ld y, ld t, ld &ax, ld &ay){
  ax = cos(t)*x - sin(t)*y;
  ay = sin(t)*x + cos(t)*y;
}

int N;
void solve(ld x0, ld y0, ld xn, ld yn, ld &ax, ld &ay){
  ld mx = double(x0+xn)/2;
  ld my = double(y0+yn)/2;

  ld h = atan2(yn-y0, xn-x0);
  ld r = sqrt((x0-xn)*(x0-xn) + (y0-yn)*(y0-yn))/2;

  /* cout << h*180/PI << "\n"; */
  ld x00, y00, xn0, yn0;
  ld mx0, my0;
  f(x0, y0, -h, x00, y00);
  f(xn, yn, -h, xn0, yn0);
  f(mx, my, -h, mx0, my0);

  ld t = 2*PI/N;

  /* cout << x00 << " " << y00 << "\n"; */
  /* cout << xn0 << " " << yn0 << "\n"; */

  if(x00 < xn0){
    t += PI;
  }

  /* cout << t*180/PI << "\n"; */
  
  /* cout << "\n"; */
  /* cout << mx0 << " " << my0 << "\n"; */


  mx0 += r*cos(t);
  my0 += r*sin(t);

/*   cout << mx0 << " " << my0 << "\n"; */

  f(mx0, my0, h, ax, ay);
}

signed main() {
  cin >> N;

  ld x0, y0, xn, yn;
  cin >> x0 >> y0 >> xn >> yn;


  ld ax, ay;
  solve(x0, y0, xn, yn, ax, ay);

  cout << ax << " " << ay << "\n";

  return 0;
}

// #include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
// using namespace atcoder;

#define rep(i, s, n) for (int i = s; i < (int)(n); i++)

typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int main() {
	ll N;
	cin >> N;

	vector<ll> x(N);
	vector<ll> y(N);
	ll x_;
	ll y_;
	ll max_x;
	ll max_x_i = 0;
	ll min_x;
	ll min_x_i = 0;

	ll max_y;
	ll max_y_i = 0;
	ll min_y;
	ll min_y_i= 0;
	
	rep(i,0,N){
		cin >> x_;
		x[i] = x_;
		cin >> y_;
		y[i] = y_;
		if (i==0){
			max_x = x_;
			min_x = x_;
			max_y = y_;
			min_y = y_;
		} else {
			if (max_x < x_) {
				max_x = x_;
				max_x_i = i;
			}if (max_y < y_) {
				max_y = y_;
				max_y_i = i;
			}
			if (min_x > x_) {
				min_x = x_;
				min_x_i = i;
			}if (min_y > y_) {
				min_y = y_;
				min_y_i = i;
			}
		}

	}
	sort(x.begin(), x.end());
	sort(y.begin(), y.end());
	ll ans = 0;
	vector<ll> temp(6);
	if (max_x_i == max_y_i && min_x_i == min_y_i) {
		chmax(ans, x[N-1]-x[1]);
		chmax(ans, x[N-2]-x[0]);
		chmax(ans, y[N-1]-y[1]);
		chmax(ans, y[N-2]-y[0]);
	} else if (max_x_i == min_y_i && min_x_i == max_y_i){
		chmax(ans, x[N-1]-x[1]);
		chmax(ans, x[N-2]-x[0]);
		chmax(ans, y[N-1]-y[1]);
		chmax(ans, y[N-2]-y[0]);

	} else {
		temp[0] = x[N-1]-x[0];
		temp[1] = y[N-1]-y[0];
		temp[2] = x[N-2]-x[0];
		temp[3] = y[N-2]-y[0];
		temp[4] = x[N-1]-x[1];
		temp[5] = y[N-1]-y[1];
		sort(temp.begin(), temp.end());
		ans = temp[4];
	}
	cout << ans << endl;
}
