#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); i++)
using P = pair<long long,long long>;
using ll = long long;
const double PI=3.14159265358979323846;

double n;
double x_0,y_0,x_2,y_2;

int main(){
    cin >> n;
    cin >> x_0 >> y_0;
    cin >> x_2 >> y_2;

    double cent_x = (x_0+x_2)/2;
    double cent_y = (y_0+y_2)/2;

    double dx = (x_0 - x_2)/2;
    double dy = (y_0 - y_2)/2;
    double sita = 2*PI/n;

    double x_1 = dx*cos(sita) - dy*sin(sita);
    double y_1 = dx*sin(sita) + dy*cos(sita);

    printf("%.10f %.10f\n",x_1+cent_x,y_1+cent_y);


}
#include<bits/stdc++.h>
using namespace std;
struct fast_ios { fast_ios(){ cin.tie(nullptr), ios::sync_with_stdio(false), cout << fixed << setprecision(4); }; } fast_ios_;
#define Local
#ifdef Local
  #define dbg(args...) do { cout << #args << " -> "; err(args); } while (0)
  void err() { std::cout << std::endl; }
  template<typename T, typename...Args>
  void err(T a, Args...args) { std::cout << a << ' '; err(args...); }
  template <template<typename...> class T, typename t, typename... A> 
  void err(const T <t> &arg, const A&... args) {
  for (auto &v : arg) std::cout << v << ' '; err(args...); }
#else
  #define dbg(...)
#endif
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
typedef vector<int> VI;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pint;
typedef pair<ll,ll> plint;
const int mod = 1000000007;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}

const int N = 2e5 + 10; 

int n, m, k;
int out[N];
pair<ld,ld> f[N];

int main()
{
	cin >> n >> m >> k;
	rep (i,0,k) {
		int x;
		cin >> x;
		out[x] = 1;
	}

	f[n] = {0,0};
	pair<ld,ld> sum = {0,0};

	per (i,0,n) {
		if (out[i]) f[i] = {1, 0};
		else f[i] = {sum.fi / m, sum.se / m + 1};
		//dbg(i, f[i].fi, f[i].se );
		sum.fi += f[i].fi, sum.se += f[i].se;
		sum.fi -= f[i + m].fi, sum.se -= f[i + m].se;
	}
	//dbg(f[0].fi, f[0].se);
	if (fabs(f[0].fi - 1) < 1e-6) cout << -1 << endl;
	else {
		cout << f[0].se / (1 - f[0].fi) << endl;
	}

    return 0;
}