#include <bits/stdc++.h>

using namespace std;

int main() {
  int N;
  double X0, Y0, XN2, YN2;
  cin >> N >> X0 >> Y0 >> XN2 >> YN2;
  
  double mX = (X0 + XN2) / 2, mY = (Y0 + YN2) / 2;
  double oX = X0 - mX, oY = Y0 - mY;
  
  double angle = 2 * M_PI / N;
  double X1 = oX * cos(angle) - oY * sin(angle),
  	Y1 = oX * sin(angle) + oY * cos(angle);
  
  cout << fixed << setprecision(11) << (X1 + mX) << " " << (Y1 + mY) << endl;
}
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <iterator>
#include <numeric>
#include <cstdint>
#include <cmath>
#include <bitset>
#include <string>
#include <list>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <random>
#include <chrono>
#include <cassert>

#define N_TIMES(i, n)     for ( uint64_t i = 0;     i <  n; ++i )
#define N_TIMES_REV(i, n) for (  int64_t i = n - 1; i >= 0; --i )

template<typename T> using maximum_heap = std::priority_queue<T, std::vector<T>, std::less<T>>;
template<typename T> using minimum_heap = std::priority_queue<T, std::vector<T>, std::greater<T>>;

template<typename T>
std::istream& operator>>(std::istream &is, std::vector<T> &v)
{
  for (typename std::vector<T>::size_type i = 0; i < v.size(); ++i) {
    is >> v[i];
  }
  return is;
}

template<typename T>
struct Point2D {
  T x, y;

  Point2D(T x = 0, T y = 0) : x(x), y(y) {}

  bool operator==(const Point2D &p) const { return x == p.x && y == p.y; }
  bool operator!=(const Point2D &p) const { return x != p.x || y != p.y; }

  Point2D  operator+ (const Point2D &p) const { return Point2D(x + p.x, y + p.y); }
  Point2D  operator- (const Point2D &p) const { return Point2D(x - p.x, y - p.y); }
  Point2D& operator+=(const Point2D &p) { x += p.x; y += p.y; return *this; }
  Point2D& operator-=(const Point2D &p) { x -= p.x; y -= p.y; return *this; }

  Point2D  operator* (T k) const { return Point2D(x * k, y * k); }
  Point2D  operator/ (T k) const { return Point2D(x / k, y / k); }
  Point2D& operator*=(T k) { x *= k; y *= k; return *this; }
  Point2D& operator/=(T k) { x /= k; y /= k; return *this; }

  T operator*(const Point2D &p) const { return x * p.x + y * p.y; }

  T dist_pow2() const { return x * x + y * y; }

  bool operator< (const Point2D &p) const {
    return dist_pow2() == p.dist_pow2() 
         ? ( y == p.y
             ? x < p.x
             : y < p.y )
         : dist_pow2() <  p.dist_pow2();
  }
  bool operator> (const Point2D &p) const {
    return dist_pow2() == p.dist_pow2()
         ? ( y == p.y
             ? x > p.x
             : y > p.y )
         : dist_pow2() >  p.dist_pow2();
  }
  bool operator<=(const Point2D &p) const { return (*this == p) || (*this < p); }
  bool operator>=(const Point2D &p) const { return (*this == p) || (*this > p); }
};

template<typename T>
bool is_parallel(const Point2D<T> &p, const Point2D<T> &q)
{
  return p.x * q.y == q.y * p.x;
}

template<typename T>
Point2D<T> orthogonal(const Point2D<T> &p)
{
  return Point2D<T>(p.y, -p.x);
}

template<typename T>
long double angle(const Point2D<T> &p, const Point2D<T> &q)
{
  T ip = p * q;
  T dist = p.dist_pow2() * q.dist_pow2();
  long double cosine = static_cast<long double>(ip) / sqrt(static_cast<long double>(dist));
  return acos(cosine);
}

auto rad2deg = [] (long double deg) { return (deg * 180.0) / M_PI; };
auto deg2rad = [] (long double deg) { return (deg * M_PI) / 180.0; };

template<typename T>
std::istream& operator>>(std::istream &is, Point2D<T> &p)
{
  is >> p.x >> p.y;
  return is;
}

template<typename T>
std::ostream& operator<<(std::ostream &os, const Point2D<T> &p)
{
  os << '(' << p.x << ", " << p.y << ')';
  return os;
}

typedef Point2D<long double> Point;

Point rotate(const Point &p, long double theta)
{
  return Point(
    p.x * cos(theta) - p.y * sin(theta),
    p.x * sin(theta) + p.y * cos(theta)
  );
}

using namespace std;

int main()
{
  uint64_t N;
  cin >> N;

  Point p0, ph;
  cin >> p0 >> ph;

  Point x = (p0 + ph) / 2;

  Point v = p0 - x;
  Point u = rotate(v, deg2rad(180.0 / (N >> 1)));

  Point p1 = u + x;
  cout << fixed << setprecision(12) << p1.x << ' ' << fixed << setprecision(12) <<  p1.y << endl;

  return 0;
}