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;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;

#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt __builtin_popcount

#define INF 1e16
#define mod 1000000007

int n,m;
vector<P> es;
double p;
double dp[1<<14];

int main(){
  cin>>n>>m>>p;
  p/=100.0;
  rep(i,m){
    int a,b;
    cin>>a>>b;a--;b--;
    es.push_back(P(a,b));
  }
  repl(S,1,1<<n){
    dp[S]=1.0;
    ll v=0;
    for(;!((S>>v)&1);v++);
    for(ll T=S-1;T>=0;T--){
      T&=S;
      if(!((T>>v)&1))continue;
      ll _T=S-T;
      double pp=dp[T];
      rep(i,m){
        if((((T>>es[i].fi)&1)&&((_T>>es[i].se)&1))||(((_T>>es[i].fi)&1)&&((T>>es[i].se)&1)))pp*=p;
      }
      dp[S]-=pp;
    }
  }
  printf("%.10f\n", dp[(1<<n)-1]);
  return 0;
}