#include <bits/stdc++.h>
#define endl "\n"
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef pair<ll, ll> PP;
#define overload4(_1, _2, _3, _4, name, ...) name
#define overload3(_1, _2, _3, name, ...) name
#define rep1(n) for (ll i = 0; i < n; ++i)
#define rep2(i, n) for (ll i = 0; i < n; ++i)
#define rep3(i, a, b) for (ll i = a; i < b; ++i)
#define rep4(i, a, b, c) for (ll i = a; i < b; i += c)
#define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define rrep1(n) for (ll i = n; i--;)
#define rrep2(i, n) for (ll i = n; i--;)
#define rrep3(i, a, b) for (ll i = b; i-- > (a);)
#define rrep4(i, a, b, c) for (ll i = (a) + ((b) - (a)-1) / (c) * (c); i >= (a); i -= c)
#define rrep(...) overload4(__VA_ARGS__, rrep4, rrep3, rrep2, rrep1)(__VA_ARGS__)
#define elif else if
ll beki(ll i)
{
    return 1ll << i;
}
#define skip(M) \
    if (M)      \
    continue
#define all(v) v.begin(), v.end()
#define allm(x, y, M) for (auto [(x), (y)] : (M))
#define alls(i, S) for (auto(&i) : (S))
#define pb push_back
#define fi first
#define se second
#pragma warning(disable : 4312)
const ll INF = (1LL << 61) - 1;
const ll MOD = 1000000007;
const ll MOD2 = 998244353;
const ll MAX_N1 = 200010;
const ll MAX_N2 = 500010;
template <class X>
void print(X x)
{
    cout << x << endl;
}
void print(vl x)
{
    for (ll i : x)
    {
        cout << i << " ";
    }
    cout << endl;
}
void print(vector<PP> x)
{
    for (PP i : x)
    {
        cout << i.first << " " << i.second << endl;
    }
    cout << endl;
}
template <class X>
int lbound(vector<X> &Y, X a)
{
    return lower_bound(all(Y), a) - Y.begin();
}
template <class X>
int ubound(vector<X> &Y, X a)
{
    return upper_bound(all(Y), a) - Y.begin();
}
template <class X>
X lbound2(vector<X> &Y, X a, int mode = 0)
{
    int x = lbound(Y, a) - mode;
    if (x < 0 || x >= Y.size())
        return INF;
    return Y[x];
}
template <class X>
X ubound2(vector<X> &Y, X a, int mode = 0)
{
    int x = ubound(Y, a) - mode;
    if (x < 0 || x >= Y.size())
        return INF;
    return Y[x];
}
template <class... T>
void zero(T &...t)
{
    (..., (t = 0));
}
template <class... T>
void cl(T &...t)
{
    (..., (t.clear()));
}
template <class... T>
void in(T &...t)
{
    (..., (cin >> t));
}
template <class... T>
void put(vl &V, int n)
{
    ll k;
    rep(i, n)
    {
        cin >> k;
        V.pb(k);
    }
}
int max_index(vl &V)
{
    return max_element(all(V)) - V.begin();
}
int min_index(vl &V)
{
    return min_element(all(V)) - V.begin();
}
ll sum(vl &V)
{
    return accumulate(all(V), 0ll);
}
void Uni(vl &V)
{
    V.erase(unique(all(V)), V.end());
}
template <class X>
bool ma(X &a, X b)
{
    if (a < b)
    {
        a = b;
        return true;
    }
    return false;
}
template <class X>
bool mi(X &a, X b)
{
    if (a > b)
    {
        a = b;
        return true;
    }
    return false;
}
void vset(vl &A, ll n, ll k)
{
    A = vl(n, k);
}
void so(vl &A)
{
    sort(all(A));
}
ll a, b, c, d, e, f, h, x, y, z, p, q, n, t, r, k, w, l, ans, m, u, v;
ll codeforces = 1;
string S, T;
vl A, B, C, D, ANS;
vector<PP> VP, VP2;
set<ll> s1, s2;
void solve()
{
    long double x1, x2, y1, y2;
    in(n);
    in(x1, y1, x2, y2);
    long double kk = M_PI / (n / 2);
    long double a1 = (x1 + x2) / 2, a2 = (y1 + y2) / 2, b1 = x1 - a1, b2 = y1 - a2;
    long double c1 = cos(kk) * b1 - sin(kk) * b2, c2 = sin(kk) * b1 + cos(kk) * b2;
    //cout << a1 << " " << a2 << endl;
    //cout << c1 << " " << c2 << endl;
    cout << a1 + c1 << " " << a2 + c2 << endl;
}
int main()
{
    cout << fixed << setprecision(15);
    cin.tie(0);
    ios::sync_with_stdio(false);
    //cin >> codeforces;
    while (codeforces--)
    {
        solve();
    }
}
#include <bits/stdc++.h>
using namespace std;

#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
using ll = long long;
using P = pair<ll, ll>;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, -1, 0, 1};
string char_to_string(char val) {
  return string(1, val);
}
int char_to_int(char val) {
  return val - '0';
}
char inverse_char(char c) {
  if(isupper(c)) return tolower(c);
  else return toupper(c);
}
template<class T> inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template<class T> inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
struct edge {
  ll to, cost;
};

#define PI 3.141592653589793

double ansx(double x1, double y1, double x2, double y2, double degree) {
  double rty = degree * PI / 180.0;
  // cout << rty << " " << sin( rty ) << endl;
  double atai_x = (x2 - x1) * cos( rty ) - (y2 - y1) * sin( rty );
  return atai_x;
}

double ansy(double x1, double y1, double x2, double y2, double degree) {
  double rty = degree * PI / 180.0;
  double atai_y = (x2 - x1) * sin( rty ) + (y2 - y1) * cos( rty );
  return atai_y;
}

int main() {
  double N; cin >> N;
  double x0, y0; cin >> x0 >> y0;
  double x2, y2; cin >> x2 >> y2;
  double cx = 0.0; double cy = 0.0;
  cx = (x0 + x2) / 2.0; cy = (y0 + y2) / 2.0;
  double theta = 360.0 / N;
  // cout << cx << " " << cy << " " << theta << endl;
  cout << fixed << setprecision(10) << ansx(cx, cy, x0, y0, theta) + cx << " " << ansy(cx, cy, x0, y0, theta) + cy << endl;
}