#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <queue>
#include <map>
#include <set>
using namespace std;
using ll = long long int;
using P = pair<int, int>;
const long double PI = 3.141592653589793;

int main(){
    int n;
    cin >> n;
    int x0, y0, x2, y2;
    cin >> x0 >> y0;
    cin >> x2 >> y2;

    long double rx = (long double)(x0+x2)/2.0;
    long double ry = (long double)(y0+y2)/2.0;
    long double x01 = (long double)x0-rx;
    long double y01 = (long double)y0-ry;
    cerr << x01 << " " << y01 << endl;
    long double r = sqrt(x01*x01 + y01*y01);
    long double x1 = r*(x01/r*cos(PI*2.0/n)-y01/r*sin(PI*2.0/n));
    long double y1 = r*(y01/r*cos(PI*2.0/n)+x01/r*sin(PI*2.0/n));
    cout << fixed << setprecision(20) << x1+rx << " " << y1+ry << endl;
    return 0;
}
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define REP(i,n) for(int i=0,_n=(int)(n);i<_n;++i)
#define ALL(v) (v).begin(),(v).end()
#define CLR(t,v) memset(t,(v),sizeof(t))
template<class T1,class T2>ostream& operator<<(ostream& os,const pair<T1,T2>&a){return os<<"("<<a.first<<","<<a.second<< ")";}
template<class T>void pv(T a,T b){for(T i=a;i!=b;++i)cout<<(*i)<<" ";cout<<endl;}
template<class T>void chmin(T&a,const T&b){if(a>b)a=b;}
template<class T>void chmax(T&a,const T&b){if(a<b)a=b;}


using D = long double;
const D PI = acos(-1.0);
const D EPS = 1e-10;
struct P {
  D x, y;
  P(D x=0, D y=0) : x(x), y(y) {}

  P& operator+=(const P& o) { x += o.x; y += o.y; return *this; }
  P& operator-=(const P& o) { x -= o.x; y -= o.y; return *this; }
  P& operator*=(const P& o) { return *this = {x*o.x - y*o.y, x*o.y + y*o.x}; }
  P& operator*=(const D& r) { x *= r; y *= r; return *this; }
  P& operator/=(const D& r) { x /= r; y /= r; return *this; }
  P operator-() const { return {-x, -y}; }

  D norm() const { return x*x + y*y; }
  D abs() const { return sqrt(norm()); }
  D arg() const { return atan2(y, x); }
  bool isZero() const { return std::abs(x) < EPS && std::abs(y) < EPS; }
  /** 象限 */
  int orth() const { return y >= 0 ? (x >= 0 ? 1 : 2) : (x < 0 ? 3 : 4); }
  static P polar(const D& rho, const D& theta = 0) { return {rho * cos(theta), rho * sin(theta)}; }
};
std::ostream &operator<<(std::ostream &os, P const &p) { return os << "(" << p.x << ", " << p.y << ")"; }
std::istream &operator>>(std::istream &is, P &p) { D a, b; is >> a >> b; p = P(a, b); return is; }
P operator+(const P& p, const P& q) { return P(p) += q; }
P operator-(const P& p, const P& q) { return P(p) -= q; }
P operator*(const P& p, const P& q) { return P(p) *= q; }
P operator*(const P& p, const D& r) { return P(p) *= r; }
P operator/(const P& p, const D& r) { return P(p) /= r; }
P operator*(const D& r, const P& p) { return P(p) *= r; }
P operator/(const D& r, const P& p) { return P(p) /= r; }
D crs(const P& a, const P& b){ return a.x*b.y - a.y*b.x; }
D dot(const P& a, const P& b){ return a.x*b.x + a.y*b.y; }


ll nextLong() { ll x; scanf("%lld", &x); return x;}

int main2() {
  int N = nextLong();
  int x0 = nextLong();
  int y0 = nextLong();
  int xN2= nextLong();
  int yN2 = nextLong();
  P a = P(x0, y0);
  P b = P(xN2, yN2);
  P m = (a + b) / 2.0;
  P v = a - m;
  P r = P(cos(2.0 * PI / N), sin(2.0 * PI / N));
  P ans = m + v * r;
  printf("%.10f %.10f\n", (double)ans.x, (double)ans.y);
  return 0;
}

int main() {

#ifdef LOCAL
  for (;!cin.eof();cin>>ws)
#endif
    main2();
  return 0;
}