#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define all(v) v.begin(),v.end()
#define repf(i,a,b) for(ll i=a;i<b;i++)
#define repb(i,a,b) for(ll i=a;i>=b;i--)
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define mod 1000000007
#define MOD 998244353 
 
using namespace std;
using namespace __gnu_pbds;
 
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
 
ordered_set<ll> ors;
 
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
ld PI=3.14159265359;
 
ll power(ll a, ll n, ll m)
{
    ll ans=1;
    while(n)
    {
        if(n&1) ans=(ans*a)%m;
        n>>=1;
        a=(a*a)%m;
    }
    return ans;
}
 
ll invmod(ll a, ll m)
{
    return power(a,m-2,m);
}

ll fac[1000001];

void init(ll m) {
    // prime();
    fac[0]=fac[1]=1;
    repf(i,2,1000001) fac[i]=(fac[i-1]*i)%m;
}

ll nCr(ll n, ll r, ll m) {
    if(n<r || r<0) return 0;
    ll nr=fac[n];
    ll dr=(fac[n-r]*fac[r])%m;
    dr=invmod(dr,m);
    ll res=(nr*dr)%m;
    return res; 
}


void solve(ll tt) {  
    ll n;
    cin>>n;
    ld x0,y0,xh,yh;
    cin>>x0>>y0>>xh>>yh;
    ld angle=2*PI/n;
    ld x1,y1;   
    x1=(x0+xh)+(x0-xh)*cos(angle)-(y0-yh)*sin(angle);
    y1=(y0+yh)+(x0-xh)*sin(angle)+(y0-yh)*cos(angle);
    x1/=2,y1/=2;
    cout<<fixed;
    cout<<setprecision(10)<<x1<<" "<<y1<<endl;
}   
 
 
int main()
{
    IOS;
    // init(mod);
    ll t=1;
    // cin>>t;
    repf(tt,1,t+1) {
        solve(tt);
    }
}     
#include <bits/stdc++.h>
#define rep(i,s,n) for (int i = s; i < (n); ++i)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
using Matrix = vector<vector<int>>;

const ll INF = LLONG_MAX;
const ld EPS = 1e-14;
const ll MOD = 1e9+7;
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, 1, 0, -1};

template<class T> void chmax(T& a, T b) { if (a < b) a = b; }
template<class T> void chmin(T& a, T b) { if (a > b) a = b; }

using C = complex<double>;
C inC() {
    double x, y;
    cin >> x >> y;
    return C(x,y);
}
int main() {
    /*
    int n, x0, y0, xn2, yn2;
    cin >> n >> x0 >> y0 >> xn2 >> yn2;
    ld theta = (180.0 / (ld)n) * M_PI / 180.0;
    ld a = sqrtl((x0 - xn2) * (x0 - xn2) + (y0 - yn2) * (y0 - yn2));
    ld b = a * cosl(theta);
    ld c = a * sinl(theta);
    */
    int n;
    cin >> n;
    C s = inC();
    C t = inC();
    C o = (s + t) / 2.0;
    double rad = 2 * M_PI / n;
    C r(cos(rad), sin(rad));
    C ans = o + (s - o) * r;
    cout << fixed << setprecision(10);
    cout << ans.real() << " " << ans.imag() << endl;
    return 0;
}
