#include <bits/stdc++.h>
using namespace std;
#define int long long
const int inf=1e18+3;
const int mix=1e6+5;
int n,m,fx,ty,cn;
int hea[mix],nxt[mix],tor[mix];
int len[mix],kai[mix],dis[mix];
priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > q;
bool vis[mix];
inline void Build(){
    int a, b, t, k;
    scanf("%lld%lld%lld%lld", &a, &b, &t, &k);
	nxt[++cn]=hea[a],tor[hea[a]=cn]=b,len[cn]=t,kai[cn]=k;
	nxt[++cn]=hea[b],tor[hea[b]=cn]=a,len[cn]=t,kai[cn]=k;
}
#undef int
int main() {
    #define int long long
    scanf("%lld%lld%lld%lld", &n, &m, &fx, &ty);
	for(int i=1;i<=m;++i)Build();
	for(int i=1;i<=n;++i)dis[i]=inf;
	q.push(make_pair(dis[fx]=0,fx));
	while(!q.empty()){
		int x=q.top().second;
		q.pop();
		if(vis[x])continue;
		for(int t,i=hea[x];i;i=nxt[i])
		if(!vis[t=tor[i]]){
			int tim=dis[x]+kai[i]-(dis[x]+kai[i]-1)%kai[i]-1+len[i];
			if(tim<dis[t])q.push(make_pair(dis[t]=tim,t));
		}
	}
	printf("%lld\n", dis[ty]<inf?dis[ty]:-1);
	return 0;
}
#include <bits/stdc++.h>

using namespace std;

typedef long long i64;
typedef unsigned long long ui64;
typedef vector<i64> vi;
typedef vector<vi> vvi;
typedef pair<i64, i64> pi;

#define pb push_back
#define sz(a) i64((a).size())
#define all(c) (c).begin(), (c).end()
#define REP(s, e, i) for(i=(s); i < (e); ++i)
inline void RI(i64 &i) {scanf("%lld", &(i));}
inline void RVI(vi &v) { for(i64 i=0;i<sz(v);++i) { RI(v[i]); } }
inline void RVVI(vvi &vv) { for(i64 i=0;i<sz(vv);++i) { RVI(vv[i]); } }
#define BUF_LENGTH 1000000
inline void RS(string &s) {static char buf[BUF_LENGTH]; scanf("%s", buf); s = buf;}
template<typename T> inline bool IN(T &S, const typename T::key_type &key) {
  return S.find(key) != S.end();
}

int main(int argc, char *argv[]) {
  i64 i, j, k;  
  i64 N, M, K;
  cin >> N >> M >> K;
  unordered_set<i64> A;
  REP(0, K, i) {
    i64 a;
    cin >> a;
    A.insert(a);
  }

  for(auto a: A) {
    bool f = true;
    REP(a, a+M, i) {
      if(!IN(A, i)) {
        f = false;
      }
    }
    if(f) {
      printf("-1\n");
      return 0;
    }
  }

  vector<double> a(N+M+1), b(N+M+1);
  REP(N, N+M+1, i) {
    a[i] = 0;
    b[i] = 0;
  }
  double b_sum = 0;
  double a_sum = 0;
  for(j=N-1;j>=0;--j) {    
    if(IN(A, j)) {
      b[j] = 0;
      a[j] = 1;
    }
    else {
      b[j] = b_sum / M + 1;
      a[j] = a_sum / M;
    }
    b_sum -= b[j+M];
    b_sum += b[j];
    a_sum -= a[j+M];
    a_sum += a[j];
  }
  printf("%.10f\n", double(b[0]) / double(1 - a[0]));

  /*
  REP(0, N+M+1, i) {
    cerr << a[i] << " " << b[i] << endl;
  }
  */

  return 0;
}

