#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
long long a[20], n, f[1 << 14], ans, inv[2000005], now;
long long dp(int s) {
  if (f[s] != -1) return f[s];
  f[s] = 1;
  for (int t = s & (s - 1); t; t = s & (t - 1)) {
    dp(t), now = 1;
    for (int i = 0; i < n; ++i)
      if (t & (1 << i))
        for (int j = 0; j < n; ++j)
          if ((s & (1 << j)) && !(t & (1 << j)))
            (now *= a[i] * inv[a[i] + a[j]] % mod) %= mod;
    (now *= f[t]) %= mod;
    (f[s] += mod - now) %= mod;
  }
  return f[s];
}
int main() {
  scanf("%lld", &n), memset(f, -1, sizeof f), inv[1] = 1;
  for (int i = 2; i <= 2000000; ++i)
    inv[i] = (mod - mod / i) * inv[mod % i] % mod;
  for (int i = 0; i < n; ++i) scanf("%lld", &a[i]);
  f[0] = 0, dp((1 << n) - 1);
  for (int s = 0; s < (1 << n); ++s) {
    int num = __builtin_popcount(s);
    now = 1;
    for (int i = 0; i < n; ++i)
      if (s & (1 << i))
        for (int j = 0; j < n; ++j)
          if (!(s & (1 << j))) (now *= a[i] * inv[a[i] + a[j]] % mod) %= mod;
    (now *= f[s] * num % mod) %= mod;
    (ans += now) %= mod;
  }
  printf("%lld", ans);
  return 0;
}
