#include <bits/stdc++.h>

using i32 = std::int32_t;
using u32 = std::uint32_t;
using i64 = std::int64_t;
using u64 = std::uint64_t;
using i128 = __int128_t;
using u128 = __uint128_t;
using isize = std::ptrdiff_t;
using usize = std::size_t;

class rep {
    struct Iter {
        usize itr;
        constexpr Iter(const usize pos) noexcept: itr(pos) { }
        constexpr void operator ++ () noexcept { ++itr; }
        constexpr bool operator != (const Iter& other) const noexcept { return itr != other.itr; }
        constexpr usize operator * () const noexcept { return itr; }
    };
    const Iter first, last;
public:
    explicit constexpr rep(const usize first, const usize last) noexcept: first(first), last(std::max(first, last)) { }
    constexpr Iter begin() const noexcept { return first; }
    constexpr Iter end() const noexcept { return last; }
};

template <class T>
using Vec = std::vector<T>;

using Point = std::complex<double>;
constexpr double PI = std::acos(-1.0);

void D_main() {
    usize N;
    std::cin >> N;
    Point p, q;
    double px, py, qx, qy;
    std::cin >> px >> py >> qx >> qy;
    p.real(px);
    p.imag(py);
    q.real(qx);
    q.imag(qy);
    const auto c = (p + q) / 2.0;
    const auto v = (p - c) * std::polar(1.0, 2.0 * PI / N);
    const auto ans = c + v;
    std::cout << ans.real() << ' ' << ans.imag() << '\n';
    return;
}

int main() {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);
    std::cout << std::fixed << std::setprecision(10);
    D_main();
    return 0;
}

#include <iostream>
using namespace std;

const int N = 35;

int prims[N], idx;
bool st[N];

int main() {
	
	for (int i = 2; i <= 30; i ++) {
		if (!st[i]) prims[idx ++] = i;
		for (int j = 0; prims[j] <= 30 / i; j ++) {
			st[prims[j] * i] = true;
			if (i % prims[j] == 0) break; 
		}
	}
	// for (int i = 0; i < idx; i ++) cout << prims[i] << ' ';
	// cout << endl;
	// cout << idx << endl;
	long long t = 1;
	for (int i = 0; i < idx; i ++) t *= prims[i];
	t *= 8;
	t *= 9;
	t *= 5;
	cout << t + 1;
	return 0;
	
}
