#include <bits/stdc++.h>

using namespace std;
const double PI=acos(-1);
const double eps=1e-5;
int main(){
	int n,a,b,c,d;
	scanf("%d",&n);
	scanf("%d%d%d%d",&a,&b,&c,&d);
	double x=1.0*(a+c)/2.0,y=1.0*(b+d)/2.0;
	double len=sqrt(1.0*(a-c)*(a-c)+1.0*(b-d)*(b-d))/2;
	double al=atan2(1.0*(d-b),1.0*(c-a));//用atan()会WA,
	double bl=2.0*PI/n;
	double cl=al+bl;
	double ax=x-len*cos(cl),ay=y-len*sin(cl);
	if(fabs(ay)<eps) ay=0;//-0的情况
	if(fabs(ax)<eps) ax=0;
	printf("%.5f %.5f\n",ax,ay);
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

ll solve() {
    ll N;
    cin >> N;
    double x, y;
    cin >> x >> y;
    complex<double> z0(x,y);
    cin >> x >> y;
    complex<double> zh(x,y), zo = (z0+zh);
    zo /= 2;
    complex<double> a(cos(2*M_PI/N),sin(2*M_PI/N));
    complex<double> ans;
    ans = zo + (z0-zo)*a;
    cout << ans.real() << " " << ans.imag() << "\n";
    return 0;
}

int main() {
    cout.setf(ios::fixed);
    cout.precision(16);
    solve();
    return 0;
}