#include<bits/stdc++.h>
using namespace std;
int main(){
  long double n;cin>>n;
  long double a,b,c,d;cin>>a>>b>>c>>d;
  const long double alp=2*M_PI/n;
  long double x=(a+c)/2,y=(b+d)/2;
  long double ansx=(a-x)*cos(alp)-(b-y)*sin(alp)+x;
  long double ansy=(a-x)*sin(alp)+(b-y)*cos(alp)+y;
  cout<<setprecision(16)<<ansx<<" "<<ansy<<endl;
  return 0;
}
#include <iostream>
#include <cmath>
#include <complex>
using namespace std;
typedef long double ld;
ld pi = acos(-1);
ld x[2],y[2];
int main(){
    cout.precision(20);
    int i,n; cin >> n;
    for(i=0;i<2;i++) cin >> x[i] >> y[i];
    complex<ld> c1(x[0],y[0]),c2(x[1],y[1]),c3(cos((ld)2*pi/(ld)n),sin((ld)2*pi/(ld)n));
    complex<ld> c4 = (c1 - c2)*c3/(ld)2 + (c1 + c2)/(ld)2;
    cout << c4.real() << " " << c4.imag() << endl;
}