#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define SZ(x) ((int)(x).size())
#define FOR(var, begin, end) for (int var = (begin); var <= (end); var++)
#define RFOR(var, begin, end) for (int var = (begin); var >= (end); var--)
#define REP(var, length) FOR(var, 0, length - 1)
#define RREP(var, length) RFOR(var, length - 1, 0)
#define EACH(value, var) for (auto value : var)
#define SORT(var) sort(var.begin(), var.end())
#define REVERSE(var) reverse(var.begin(), var.end())
#define RSORT(var) SORT(var); REVERSE(var)
#define OPTIMIZE_STDIO ios::sync_with_stdio(false); cin.tie(0); cout.precision(10); cout << fixed
#define endl '\n'

const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;

const double PI = (acos(-1));

void solve(istream& cin, ostream& cout) {
  double n;
  cin >> n;
  double x0, y0, x1, y1;
  cin >> x0 >> y0 >> x1 >> y1;
  double X = (x0 + x1) / 2;
  double Y = (y0 + y1) / 2;
  double x2 = X + (x0 - X) * cos(2 * PI / n) - (y0 - Y) * sin(2 * PI / n);
  double y2 = Y + (x0 - X) * sin(2 * PI / n) + (y0 - Y) * cos(2 * PI / n);
  cout << x2 << " " << y2 << endl;
}

#ifndef TEST
int main() {
  OPTIMIZE_STDIO;
  solve(cin, cout);
  return 0;
}
#endif

    /* Great things never come from comfort zones,
    "whatever the mind of a man can conceive and believe,it can achieve." */
     
    #include <bits/stdc++.h>

   // #include <ext/pb_ds/assoc_container.hpp>
  //  #include <ext/pb_ds/tree_policy.hpp>

    using namespace std;

  //  using namespace __gnu_pbds;
  //  using ordered_set = tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>;
  
 
    void my_dbg() { cout << endl; }
    template<typename Arg, typename... Args> void my_dbg(Arg A, Args... B) 
    { cout << ' ' << A; my_dbg(B...); }
    #define dbg(...) cout << "(" << #__VA_ARGS__ << "):", my_dbg(__VA_ARGS__)
 
    #define ll long long
    #define dd long double
    #define scf(n) scanf("%d",&n)
    #define lscf(n) scanf("%lld",&n)
    #define lpri(n) printf("%lld ",n)
    #define pri(n) printf("%d ",(int)n)
    #define prin(n) printf("%d\n",(int)n)
    #define lprin(n) printf("%lld\n",n)
    #define rep(i,ini,n) for(int i=ini;i<(int)n;i++)
    #define show(a) for(auto xy: a) pri(xy); printf("\n");
 
    #define pb push_back
    #define mp make_pair
    #define F first
    #define S second
    #define all(x)     x.begin(),x.end()
    #define SET(a,b) memset(a,b,sizeof(a))
    #define tc   int tt; scf(tt); while(tt--)
 
    #define inf INT_MAX
    #define ninf INT_MIN
    #define gcd __gcd
    #define bitcount(n) __builtin_popcount(n)
 
    const int M=1e9+7;

    const int N = 1e5+7;

  


 int main()
{  
    dd n;
    cin>>n;

    int a,b,x,y;
    scf(a),scf(b),scf(x),scf(y);

    dd cx=0.5*(a+x);

    dd cy=(b+y)*(0.5);

    dd PI=3.141592653589793;

    dd ax=(a-cx)*cos(2*PI/n) - (b-cy)*sin(2*PI/n);
    dd ay=(a-cx)*sin(2*PI/n) + (b-cy)*cos(2*PI/n);

    printf("%.8Lf %.8Lf",(ax+cx) ,(ay+cy));


}
        