#include <bits/stdc++.h>
using namespace std;
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    int n;
    cin >> n;
    double x_0, y_0, xn, yn;
    cin >> x_0 >> y_0 >> xn >> yn;
    double midp_x = (x_0 + xn) / 2, midp_y = (y_0 + yn) / 2;
    const double pi = acos(-1.0);
    double ang = 2 * pi / n;
    double relx = x_0 - midp_x;
    double rely = y_0 - midp_y;
    double new_relx = relx * cos(ang) - rely * sin(ang);
    double new_rely = relx * sin(ang) + rely * cos(ang);
    cout << setprecision(15) << fixed << midp_x + new_relx << " " << midp_y + new_rely << endl;
    return 0;
}

#include<bits/stdc++.h>
//#include<boost/multiprecision/cpp_int.hpp>
//using namespace boost::multiprecision;
using namespace std;
using ll = int64_t;
using pii = pair<int, int>;
#define rep(i,n) for(int i=0; i<(int)n; i++)
#define llrep(i,n) for(ll i=0; i<(ll)n; i++)
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()) //sortしてから使う
#define INF 2147483647
#define LLINF 9223372036854775807LL
#define fi first
#define se second
#define kiriage(x,y) (((x)+(y)-1)/(y))
typedef vector<int> vi;
typedef vector<ll> vll;

using C = complex<double>;

C inC(){
	double x,y; cin>>x>>y;
	return C(x,y);
}

int main(){
	int n; cin>>n;
	C s = inC();
	C t = inC();
	C center = (s+t)/2.0;
	double PI = acos(-1);
	double rad = 2*PI/n;
	C r(cos(rad), sin(rad));
	C ans = center + (s - center) * r;
	cout << setprecision(10) << ans.real() << " " << ans.imag() << endl;
}