#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;

int main() {
  int N;
  cin >> N;
  
  complex<long double> p0, pN2;
  {
    double x, y;
    cin >> x >> y;
    p0 = x + y * 1i;
    cin >> x >> y;
    pN2 = x + y * 1i;
  }
  
  complex<long double> g = (p0 + pN2) * (long double)0.5;
  complex<long double> rot = polar(1.0, M_PI * 2 / N);
  
  complex<long double> p1 = (p0 - g) * rot + g;
  
  cout << fixed << setprecision(10) << p1.real() << ' ' << p1.imag() << endl;
  
  return 0;
}