#include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define repi(i, x) \
	for (auto i = (x).begin(), i##_fin = (x).end(); i != i##_fin; i++)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int, int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long, long long> P;
typedef vector<P> VP;
template <class T>
inline bool chmax(T& a, T b) {
	if (a < b) {
		a = b;
		return 1;
	}
	return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
	if (a > b) {
		a = b;
		return 1;
	}
	return 0;
}
template <class T, class U>
ostream& operator<<(ostream& os, const pair<T, U>& p) {
	os << p.first << " " << p.second;
	return os;
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
	rep(i, v.size()) {
		if (i) os << " ";
		os << v[i];
	}
	return os;
}
template <class T, class U>
istream& operator>>(istream& is, pair<T, U>& p) {
	is >> p.first >> p.second;
	return is;
}
template <class T>
istream& operator>>(istream& is, vector<T>& v) {
	rep(i, v.size()) { is >> v[i]; }
	return is;
}
const long long INFLL = 1LL << 60;
const int INF         = 1 << 30;
const double PI       = acos(-1);
#ifdef LOCAL
#define dbg(x) cerr << #x << ": " << (x) << '\n'
#define say(x) cerr << (x) << '\n'
#else
#define dbg(x)
#define say(x)
#endif
string solve(bool a) { return ((a) ? "Yes" : "No"); }
int main() {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int n;
	pair<double, double> ans, a, b, center, dis;
	cin >> n >> a >> b;
	double turn = 2.0 * PI / n;
	dbg(turn);
	center = mp(a.F + b.F, a.S + b.S);
	center.F /= 2.0;
	center.S /= 2.0;
	dbg(center);
	dis = mp(a.F - center.F, a.S - center.S);
	dbg(dis);
	ans.F = dis.F * cos(turn) - dis.S * sin(turn);
	ans.S = dis.F * sin(turn) + dis.S * cos(turn);
	dbg(ans);
	ans.F += center.F;
	ans.S += center.S;
	cout << fixed << setprecision(15) << ans.F << " " << ans.S << '\n';
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fcout cout << fixed << setprecision(18)

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  double N; cin >> N;
  double X0, Y0; cin >> X0 >> Y0;
  double Xn, Yn; cin >> Xn >> Yn;

  double Xc = (X0 + Xn) / 2.0;
  double Yc = (Y0 + Yn) / 2.0;

  double X00 = (X0 - Xc);
  double Y00 = (Y0 - Yc);

  double theta = (2 * 3.1415926535) / N;
  double X10 = (X00 * cos(theta) - Y00 * sin(theta));
  double Y10 = (X00 * sin(theta) + Y00 * cos(theta));

  double ansX = X10 + Xc;
  double ansY = Y10 + Yc;
  fcout << ansX << ' ' << ansY << '\n';
  return 0;
}