#include<bits/stdc++.h>
using namespace std;

#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
#define pii pair<int,int>

int N;
int U[210], L[210];
int U_id[210], L_id[210];
bool dp[400];

bool unit(int s, int d)
{
    for(int i = 0; i < d; i++)
    {
        if(U_id[s + i] != 0)
        {
            return false;
        }
        if(L_id[s + i + d] != 0)
        {
            return false;
        }
        /*
        if(L_id[s + 1] != 0 && U[L_id[s + i]] != -1 && U[L_id[s + i]] != s + i + d)
        {
            return false;
        }
        if(U_id[s + i + d] != 0 && L[U_id[s + i + d]] != -1 && L[U_id[s + i + d]] != s + i)
        {
            return false;
        }
        */
        if(L_id[s + i] != 0 && U_id[s + i + d] != 0 && L_id[s + i] != U_id[s + i + d])
        {
            return false;
        }
    }
    return true;
}

signed main()
{
    cin >> N;
    rep(i, N)
    {
        int a, b;
        cin >> a >> b;
        a, b;
        L[i + 1] = a;
        U[i + 1] = b;
        if(a != -1 && b != -1 && a >= b)
        {
            cout << "No" << endl;
            return 0;
        }
        if(a != -1)
        {
            if(L_id[a] != 0 || U_id[a] != 0)
            {
                cout << "No" << endl;
                return 0;
            }
            L_id[a] = i + 1;
        }
        if(b != -1)
        {
            if(U_id[b] != 0 || L_id[b] != 0)
            {
                cout << "No" << endl;
                return 0;
            }
            U_id[b] = i + 1;
        }
    }

    dp[1] = true;
    for(int i = 1; i <= 2 * N; i++)
    {
        if(dp[i])for(int j = 1; i + j * 2 <= 2 * N + 1; j++)
            if(unit(i, j))dp[i + j * 2] = true;
    }

    if(dp[2 * N + 1])cout << "Yes" << endl;
    else cout << "No" << endl;

    return 0;
}

#include <cstdio>
#include <utility>

long double abs(long double a) 
{
	if (a < 0) return -a;
	return a;
}

const int N = 100000;
int n, m, k;
std::pair<long double, long double> e[N];
bool u[N];

int main() 
{
	scanf("%d%d%d", &n, &m, &k);
	for (int i = 0; i < k; ++i) {
		int v;
		scanf("%d", &v);
		u[v] = true;
	}
	std::pair<long double, long double> s;
	for (int i = n - 1; i >= 0; --i) {
		if (u[i]) e[i].second = 1;
		else {
			e[i].first = 1 + s.first / m;
			e[i].second = s.second / m;
		}
		s.first += e[i].first;
		s.second += e[i].second;
		if (n - i > m) {
			s.first -= e[i + m].first;
			s.second -= e[i + m].second;
		}
	}
	if (abs(e[0].second - 1) > 1e-10) printf("%.15lf\n", (double)(e[0].first / (1 - e[0].second)));
	else printf("-1\n");
	return 0;
}
