#include <bits/stdc++.h>
using namespace std;
const int N = 15;
const long long mod = 1e9 + 7;
int n;
int a[N];
int g[1 << N | 1], f[1 << N | 1];
int inv[N][N];
inline int Pop(int x) {
  int c = 0;
  while (x) ++c, x -= x & -x;
  return c;
}
inline int power(int a, int p) {
  int ans = 1;
  for (; p; p >>= 1)
    (p & 1) && (ans = 1ll * ans * a % mod), a = 1ll * a * a % mod;
  return ans;
}
int main() {
  scanf("%d", &n);
  for (register int i = 1; i <= n; ++i) scanf("%d", a + i);
  for (register int i = 1; i <= n; ++i)
    for (register int j = 1; j <= n; ++j)
      inv[i][j] = power(a[i] + a[j], mod - 2);
  for (register int sta = 1; sta < 1 << n; ++sta) {
    g[sta] = 1;
    for (register int i = 1; i <= n; ++i) {
      if (!(sta & (1 << (i - 1)))) continue;
      for (register int j = 1; j <= n; ++j) {
        if ((sta & (1 << (j - 1)))) continue;
        g[sta] = 1ll * g[sta] * a[i] % mod * inv[i][j] % mod;
      }
    }
  }
  for (register int S = 1; S < 1 << n; ++S) {
    f[S] = mod - g[S];
    for (register int T = S; T; T = (T - 1) & S) {
      int iv = 1;
      for (register int i = 1; i <= n; ++i) {
        if (!(S & (1 << i - 1) && !(T & (1 << i - 1)))) continue;
        for (register int j = 1; j <= n; ++j) {
          if (!(T & (1 << j - 1))) continue;
          iv = 1ll * a[i] * inv[i][j] % mod * iv % mod;
        }
      }
      f[S] = (f[S] + 1ll * f[T] * g[S xor T] % mod * power(iv, mod - 2)) % mod;
    }
    f[S] = mod - f[S];
  }
  int ans = 0;
  for (register int S = 1; S < 1 << n; ++S)
    ans = (ans + 1ll * Pop(S) * f[S]) % mod;
  printf("%d\n", ans);
  return 0;
}
