//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <x86intrin.h> // __builtin_popcount(int x)
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(), v.rend()
#define V vector
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define sz(x) int(x.size())
template <typename T> bool chmin(T &a, const T &b) {if(a > b){a = b; return true;} return false;}
template <typename T> bool chmax(T &a, const T &b) {if(a < b){a = b; return true;} return false;}
template <typename T> void print(T a) {cout << a << ' ';}
template <typename T> void printe(T a) {cout << a << endl;}
template <typename T> void printv(T a) {rep(i, sz(a))print(a[i]); cout<<endl;}
template <typename T> void printp(pair<T, T> a) {print(a.first); cout<<a.second<<endl;}
template <typename A, size_t N, typename T> void Fill (A (&array)[N], const T & val) {fill ((T*)array, (T*)(array+N), val);}
V<int> dx = {-1, 1,  0, 0, -1, -1,  1, 1};
V<int> dy = { 0, 0, -1, 1, -1,  1, -1, 1};

// 宣言 C z(x, y) -> z = x+yi
using C = complex<double>;

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

int main () {
    int n; cin >> n;
    C z0 = input(), z1 = input();
    C c = (z0 + z1) / 2.0;
    double theta = (double) 2 * M_PI / n;
    //C r(cos(theta), sin(theta));
    C r = C(cos(theta), sin(theta));
    C ans = c + (z0-c) * r;
    printf("%.10lf %.10lf\n", ans.real(), ans.imag());
    return 0;
}
#include <iostream>
#include <random>
#include <cmath>
using namespace std;
struct Point
{
  int i;
  int j;
};

string calculate_path(Point s, Point t) {
  int di = s.i - t.i;
  int dj = s.j - t.j;

  char ci = 'U', cj = 'L';
  if (di < 0) {
    ci = 'D';
    di = -di;
  }
  if (dj < 0) {
    cj = 'R';
    dj = -dj;
  }

  string path;
  mt19937 mt(3017);

  while (di > 0 && dj > 0) {
    bernoulli_distribution dist((double)di / (double)dj);
    if (dist(mt)) {
      path.push_back(ci);
      di--;
    } else {
      path.push_back(cj);
      dj--;
    }
  }
  while (di > 0) {
    path.push_back(ci);
    di--;
  }
  while (dj > 0) {
    path.push_back(cj);
    dj--;
  }
  return path;
}

int main() {

  // main
  for (int k = 0; k < 1000; ++k) {
    // input start and terminal point
    Point s, t;
    cin >> s.i >> s.j >> t.i >> t.j;
    // calculate path
    cout << calculate_path(s, t) << endl << flush;
    // output path
    // input path length
    int b;
    cin >> b;
  }
  return 0;
}

