#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define io ios::sync_with_stdio(false); cin.tie(0)

// geometry

using C = complex<double>;

int main()
{
    io;
    int n; cin >> n;
    double a, b, c, d;
    cin >> a >> b >> c >> d;
    C A(a, b), B(c, d);
    C O = (A + B) / 2.0;
    double rad = 2.0 * M_PI / n;
    C r(cos(rad), sin(rad));
    C ans = O + (A - O)*r;
    cout << real(ans) << ' ' << imag(ans) << endl;
    return 0;
}
#include<bits/stdc++.h>
#include <math.h> 
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define perl(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define pb push_back
#define mkp make_pair
#define ins insert
#define pqueue(x) priority_queue<x,vector<x>,greater<x>>
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
#define vtpl(x,y,z) vector<tuple<x,y,z>>
#define rev(x) reverse(x);
#define lin(x) ll x; cin>>x;
#define stin(x) string x; cin>>x;
#define yn(x)  if(x) {  cout<<"Yes"<<endl;   }    else {    cout<<"No"<<endl;   }
#define YN(x)  if(x) {  cout<<"YES"<<endl;   }    else {    cout<<"NO"<<endl;   }
#define co(x) cout<<x<<endl;
using ll=long long;
using ld=long double;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
using vpl=vector<pl>;
using vvpl=vector<vpl>;
const ll mod=1000000007;
const ll MOD9=998244353;
const int inf=1e9+10;
const ll INF=4e18;
const ld pi=3.14159265368979;
const ll dy[8]={1,0,-1,0,1,1,-1,-1};
const ll dx[8]={0,-1,0,1,1,-1,1,-1};
template <typename T> inline bool chmax(T &a, T b) {
    return ((a < b) ? (a = b, true) : (false));
}
template <typename T> inline bool chmin(T &a, T b) {
    return ((a > b) ? (a = b, true) : (false));
}
ll powmod(ll n, ll k, ll m) {
ll r=1;
 for(; k>0; k >>=1) {
   if(k&1) r=(r*n)%m;
   n=(n*n)%m;
 }
  return r;
}

ll fact(ll n) {
ll a=1;
rep(i,n) {
a=a*(n-i);
}
return a;
}

ll pow(ll a, ll b) {
ll x=1;
rep(i,b) {
x=x*a;
}
return x;
}

int main() {
 lin(N);
  lin(a);
  lin(b);
  lin(c);
  lin(d);
  
  ld xm=(ld)(a+c)/(ld)2;
  ld ym=(ld)(b+d)/(ld)2;
  
  //vector radius
  
  ld x=a-xm;
  ld y=b-ym;
  
  ld theta=(ld)2*3.14159265358979/(ld)N;
  ld z1=cos(theta)*x-sin(theta)*y;
  ld z2=sin(theta)*x+cos(theta)*y;
  CST(15);
  cout<<xm+z1<<" "<<ym+z2<<endl;
}

  