#include <bits/stdc++.h>
using namespace std;
int recur_depth = 0;
const long long sz = 14, isz = 2e6 + 10, mod = 1e9 + 7;
long long p[sz], win[sz][sz], scc[(1 << sz)], n;
long long fastPow(long long x, long long n, long long MOD) {
  long long ret = 1;
  while (n) {
    if (n & 1) ret = (ret * x) % MOD;
    x = (x * x) % MOD;
    n >>= 1;
  }
  return ret % MOD;
}
inline long long inv(long long x) { return fastPow(x, mod - 2, mod); }
long long prob(long long from, long long to) {
  long long ret = 1;
  for (long long i = 0; i < n; ++i) {
    for (long long j = 0; j < n; ++j) {
      if ((from >> i & 1) && (to >> j & 1)) ret = (ret * win[i][j]) % mod;
    }
  }
  return ret;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> n;
  for (long long i = 0; i < n; ++i) cin >> p[i];
  for (long long i = 0; i < n; ++i)
    for (long long j = 0; j < n; ++j)
      win[i][j] = (p[i] * inv(p[i] + p[j])) % mod;
  long long ans = 0, lim = (1 << n) - 1;
  for (int mask = 0; mask <= lim; mask++) {
    scc[mask] = 1;
    for (int i = mask; i > 0; i = (i - 1) & mask) {
      if (i == mask) continue;
      scc[mask] -= (scc[i] * prob(i, mask ^ i)) % mod;
      if (scc[mask] < 0) scc[mask] += mod;
    }
    long long win_prob = (scc[mask] * __builtin_popcount(mask)) % mod;
    win_prob = (win_prob * prob(mask, lim ^ mask)) % mod;
    ans += win_prob;
    if (ans >= mod) ans -= mod;
  }
  cout << ans << '\n';
  return 0;
}
