#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstring>
#include <vector>
#include <deque>
#include <queue>
#include <set>
#include <map>
#include <valarray>
#include <iterator>
#include <functional>
#include <limits>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <cassert>
#include <unordered_map>
#include <unordered_set>
#include <stack>
using namespace std;
#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define ss second
#define pb push_back
#define pf push_front
#define mp make_pair
#define pu push
#define pp pop_back
#define in insert
#define ff first
#define ss second
#define as assign
#define rs resize
#define sz(a) (ll)((a).size())
#define otp(s) cout<<s<<endl;
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)
#define all(it,a) for(auto it=(a).begin();it!=(a).end();it++)
#define rev(it,a) for(auto it=(a).rbegin();it!=(a).rend();it++)
const int mod = 1e9+7;
/*sort(vec.begin(), vec.end(),
[](node const & e,  node const & g) -> bool{return e.mode < g.mode; } );
ceil()
struct myComp{bool operator()(pll const& p1, pll const& p2)return p1.ff < p2.ff;}
priority_queue<pi, vector<pi>, greater<pi> > pq;
*max_element(Vector.begin()+I,vector.begin()+j+1);*/
inline ll add(ll a, ll b){a += b; if(a >= mod)a -= mod; return a;}
inline ll sub(ll a, ll b){a -= b; if(a < 0)a += mod; return a;}
inline ll mul(ll a, ll b){return (ll)((ll) a * b %mod);}
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<ll,ll> pll;
typedef vector<pll> vpll;
typedef vector<vpll> vvpll;

int main()
{
//    fast;
    ll n;
    cin>>n;
    ll ans=16*27*25*7*11;
    ans*=13*17*19*23*29;
    
    cout<<ans+1<<endl;
    return 0;
    
}


#include<bits/stdc++.h>

#define fox(i,a,b) for(int i=a;i<=b;++i)
#define ll long long

using namespace std;

int _x, _f; char _c;
inline int rd() {
	_x = 0, _f = 1, _c = getchar();
	for (; !isdigit(_c); _c = getchar()) if (_c == '-') _f = 0;
	for (; isdigit(_c); _c = getchar()) _x = _x * 10 + _c - '0';
	return _f ? _x : -_x;
}

double pi = acos(-1);

int n;
struct point { double x, y;} p0, p2, p1, zd;

signed main() {
	n = rd();
	p0.x = rd(), p0.y = rd();
	p2.x = rd(), p2.y = rd();
	p1.x = (p0.x + p2.x) / 2, p1.y = (p0.y + p2.y) / 2;
	p0.x -= p1.x, p0.y -= p1.y;
	//printf("%.6lf %.6lf\n", p0.x, p0.y);
	//printf("%.6lf %.6lf\n", p1.x, p1.y);
	double phi = pi * 2 / n;
	zd.x = p0.x * cos(phi) - p0.y * sin(phi);
	zd.y = p0.x * sin(phi) + p0.y * cos(phi);
	printf("%.6lf %.6lf\n", zd.x + p1.x, zd.y + p1.y);
	return 0;
}
