// ＵＴＦ−８

#include<bits/stdc++.h>

using namespace std;
using ll = long long int;
using lc = complex<double>;

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

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

int main(void) {
    constexpr ll MOD = 1 ? 1e9+7 : 998244353;
    const double PI = acos(-1);
    constexpr double eps = 1e-10;
    cout << fixed << setprecision(32);
    cin.tie(0); ios::sync_with_stdio(false);

    if(1) {
        ll n;
        cin >> n;
        lc p0, p1;
        {
            double x0, y0, x1, y1;
            cin >> x0 >> y0 >> x1 >> y1;
            p0 = lc(x0, y0);
            p1 = lc(x1, y1);
        }
        lc c = (p0 + p1) / 2.0;

        lc res = (p0 - c) * lc(cos(2 * PI / n), sin(2 * PI / n)) + c;
        cout << real(res) << ' ' << imag(res) << endl;
    }
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <cmath>
#include <complex>

using namespace std;
using ll = long long;
using C = complex<double>;

C inC() {
    double x, y;
    cin >> x >> y;
    return C(x, y);
}

int main() {
    int n;
    cin >> n;
    C s = inC();
    C t = inC();
    
    C o = (s+t)/2.0;

    double pi = acos(-1);
    double rad = 2 * pi / n;
    C r(cos(rad), sin(rad));

    C ans = o + (s - o) * r;
    printf("%.10f %.10f\n", ans.real(), ans.imag());
    return 0;
}
 