Problem: An undirected graph is given. Each edge of the graph disappears with a constant probability. Calculate the probability with which the remained graph is connected.



Input

The first line contains three integers N (1 \leq N \leq 14), M (0 \leq M \leq 100) and P (0 \leq P \leq 100), separated by a single space. N is the number of the vertices and M is the number of the edges. P is the probability represented by a percentage.

The following M lines describe the edges. Each line contains two integers v_i and u_i (1 \leq u_i, v_i \leq N). (u_i, v_i) indicates the edge that connects the two vertices u_i and v_i.

Output

Output a line containing the probability with which the remained graph is connected. Your program may output an arbitrary number of digits after the decimal point. However, the absolute error should be 10^{-9} or less.

Examples

Input

3 3 50
1 2
2 3
3 1


Output

0.500000000000


Input

3 3 10
1 2
2 3
3 1


Output

0.972000000000


Input

4 5 50
1 2
2 3
3 4
4 1
1 3


Output

0.437500000000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii;
const int MOD = 1000000007;
const int INF = MOD + 1;
const ld EPS = 1e-12;
template<class T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template<class T> T &chmax(T &a, const T &b) { return a = max(a, b); }

/*--------------------template--------------------*/

int n, m;
ld p;
vector<vi> g;
vector<ld> dp;

int main()
{
	cin.sync_with_stdio(false); cout << fixed << setprecision(10);
	cin >> n >> m >> p;
	g.resize(n, vi(n));
	dp.resize(1 << n);
	p /= 100.0;
	REP(i, m)
	{
		int a, b; cin >> a >> b;
		a--; b--;
		g[a][b]++;
		g[b][a]++;
	}
	REP(s, 1 << n)
	{
		int v = s&~s;
		dp[s] = 1.0;
		for (int t = (s - 1) & s; t > 0; t = (t - 1)&s)
		{
			if (!(t&(1 << v))) continue;
			int edge = 0;
			int u = s^t;
			REP(i, n)
			{
				if (!((t >> i) & 1)) continue;
				REP(j, n)
				{
					if (((u >> j) & 1) && g[i][j]) edge++;
				}
			}
			dp[s] -= dp[t] * pow(p, edge);
		}
	}
	cout << dp[(1 << n) - 1] << endl;
	return 0;
}