// Problem: D - Opposite
// Contest: AtCoder - AtCoder Beginner Contest 197（Sponsored by Panasonic）
// URL: https://atcoder.jp/contests/abc197/tasks/abc197_d
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
// 
// Powered by CP Editor (https://cpeditor.org)

/*

WINNERS NEVER QUIT AND QUITTERS NEVER WIN!!

Falling down is an accident, Staying down is a choice.

*/
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<long,long> pl;
typedef pair<ll,ll> pll;
typedef vector<long> vl;
typedef vector<bool> vb;
typedef vector<ll> vll;
typedef vector<vl> vvl;
typedef vector<vb> vvb;
typedef vector<vll> vvll;
typedef vector<pll> vpll;
typedef vector<string> vs;
typedef unordered_map<ll,ll> umll;

#define FOR(i,a,b) for(long long i=a;i<b;++i)
#define REV(i,a,b) for(long long i=a;i>=b;i--)
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define ub upper_bound
#define lb lower_bound
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define tc ll tests;cin>>tests;while(tests--)
#define io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define coutv(v) for(auto it: (v))cout<<it<<" ";newl;
#define cout2d(v) for(auto it: (v)) {for(auto j:it) cout<<j<<" ";newl;}
#define cinv(v,n) vll (v)(n);FOR(i,0,(n)){cin>>v[i];}
#define cinvg(v,n) (v).resize(n);FOR(i,0,(n)){cin>>v[i];}
#define cin2d(v,n,m) vvll (v)(n,vll(m,0));FOR(i,0,n){FOR(j,0,m){cin>>v[i][j];}}
#define cin2dg(v,n,m) (v).resize(n,vll(m));FOR(i,0,n){FOR(j,0,m){cin>>v[i][j];}}
#define newl cout<<"\n"
#define mod 1000000007
#define INF LLONG_MAX/2

int main()
{
    io;
    ll n,x0,y0,xn,yn;
    cin>>n;
    cin>>x0>>y0>>xn>>yn;
    ld pi =3.141592653589793238 , theta = (2*pi)/(ld)n;
    
    ld xm = ((ld)(x0+xn))/2, ym = ((ld)(y0+yn))/2;
    
    ld x0_new = x0-xm, y0_new = y0-ym;
    
    ld x1_new = x0_new*cos(theta)-y0_new*sin(theta), y1_new = x0_new*sin(theta)+y0_new*cos(theta);
    
    ld x1 = x1_new + xm, y1 = y1_new + ym;
    
    cout<<setprecision(10)<<x1<<" "<<y1;
    return 0;
}


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

int main() {
  double N, x0, y0, xn2, yn2;
  cin >> N >> x0 >> y0 >> xn2 >> yn2;
  complex<double> a(x0,y0), b(xn2, yn2), c, d;
  c = (a+b)/2.0;
  d = c + (a-c)*polar(1.0, M_PI*2.0/N);
  
  cout << d.real() << ' ' << d.imag() << endl;
  return 0;
  
}