#ifdef _LOCAL
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
using namespace std;

static const ld PI = 3.141592653589793;

pair<ld, ld> solve(int n, ld x, ld y, ld x2, ld y2) {
    ld xm = (x + x2) / (ld)2, ym = (y + y2) / (ld)2;
    ld vec_x = x - xm, vec_y = y - ym;

    ld dec = (ld)360 / (ld)n;
    ld rad = PI * dec / (ld)180;

    ld vec_xc = (ld)cos(rad) * vec_x - (ld)sin(rad) * vec_y,
       vec_yc = (ld)sin(rad) * vec_x + (ld)cos(rad) * vec_y;

    return make_pair(xm + vec_xc, ym + vec_yc);
}

#ifndef _LOCAL
int main() {
    int n;
    ld x, y, x2, y2;
    cin >> n >> x >> y >> x2 >> y2;
    pair<ld, ld> res = solve(n, x, y, x2, y2);
    cout << fixed << setprecision(12) << res.first;
    cout << " ";
    cout << fixed << setprecision(12) << res.second << endl;
}
#endif
#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <cstdio>
#include <string>
#include <cmath>
#include <queue>
#include <tuple>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <random>
#include <set>
#include <stack>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <bits/stdc++.h>

#define maxs(x,y) x = max(x,y)
#define mins(x,y) x = min(x,y)
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repr(i, n) for (int i = (n) - 1; i >= 0; i--)
#define FOR(i,i0,n) for(int (i)=(i0);(i)<(n);(i)++)
#define FORR(i,i0,n) for(int (i)=(n)-1; (i)>=(i0);(i)--)
#define SORT(x) sort(x.begin(),x.end())
#define SORTR(x) sort(x.begin(),x.end(),greater<int>())
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple

using namespace std;
using ll = long long;
using LL = long long;

typedef std::pair<int, int> pii;
typedef std::pair<int, double> pid;
typedef std::vector<int> vi;
typedef std::vector<pii> vii;

const double PI = 3.14159265358979323846264338327950L;
const int mod = 1e9+7;
const ll INF = 1LL<<60;

struct container {
    int bottom, top, id;
    container(int id, int bottom, int top) : top(top), bottom(bottom), id(id) {
    }
};


struct Edge {
    ll to, from, cost;
    Edge(ll to, ll from, ll cost) :to(to), from(from), cost(cost) {}
    Edge(): to(-1), from(-1), cost(0){}
};

struct Data {
    ll cost,val;
    Data(ll cost=0, ll val=0) : cost(cost), val(val){}
    bool operator<(const Data& a) const {
        return cost > a.cost;
    }
};



struct edge{
    int a,b,c;
    edge(int a = -1,int b = -1, int c = -1):a(a),b(b),c(c){}
    bool operator<(const edge& a) const {
        return c > a.c;
    }
};

using C = complex<double>;

C inC(){
    double x,y;
    cin >> x >> y;
    return {x,y};
}
void solve(){
    int n;
    cin >> n;
    C a = inC(), b = inC();
    C o = (a+b)/2.;
    double theta = 2*PI/n;
    C r = {cos(theta),sin(theta)}; 
    
    C c =r*(a-o)+o;
    
    
    printf ("%.10f %.10f",c.real(),c.imag());
    
    
}




int main() {
    int T = 1;
    // cin >> T;

    while (T--) {
        solve();
        // cout << endl;
    }
}












