#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &FF) {
  int RR = 1;
  FF = 0;
  char CH = getchar();
  for (; !isdigit(CH); CH = getchar())
    if (CH == '-') RR = -RR;
  for (; isdigit(CH); CH = getchar()) FF = FF * 10 + CH - 48;
  FF *= RR;
}
inline void file(string str) {
  freopen((str + ".in").c_str(), "r", stdin);
  freopen((str + ".out").c_str(), "w", stdout);
}
const long long mod = 1e9 + 7;
const int N = 15, M = 5e4 + 10;
int n, ai[N];
long long g[M][N], f[M], flag[M];
long long Qpow(long long x, long long k) {
  if (k <= 1) return k ? x : 1;
  long long h = Qpow(x, k / 2);
  h = h * h % mod;
  return (k & 1) ? h * x % mod : h;
}
long long suanf(int i) {
  long long p = 0;
  if (flag[i]) return f[i];
  flag[i] = 1;
  for (int j = (i - 1) & i; j; j = (j - 1) & i) {
    if (!j) break;
    long long c = 1;
    for (int k = 1; k <= n; k++)
      if ((j >> (k - 1)) & 1) (c *= g[i ^ j][k]) %= mod;
    p += c * suanf(j) % mod;
    p %= mod;
  }
  f[i] = (1 - p + mod) % mod;
  return f[i];
}
int main() {
  read(n);
  for (int i = 1; i <= n; i++) read(ai[i]);
  for (int i = 0; i <= (1 << n) - 1; i++)
    for (int j = 1; j <= n; j++) {
      g[i][j] = 1;
      for (int k = 1; k <= n; k++)
        if ((i >> (k - 1)) & 1)
          (g[i][j] *= ai[j] * Qpow(ai[j] + ai[k], mod - 2) % mod) %= mod;
    }
  long long res = 0;
  for (int i = 1; i <= (1 << n) - 1; i++) {
    long long c = 1, t = 0;
    for (int j = 1; j <= n; j++)
      if ((i >> (j - 1)) & 1) (c *= g[((1 << n) - 1) ^ i][j]) %= mod, t++;
    res += suanf(i) * c % mod * t % mod;
    res %= mod;
  }
  cout << res << endl;
  return 0;
}
