#include <bits/stdc++.h>
using namespace std;
const int N = (int)7e1 + 1;
const int MOD = (int)1e9 + 7;
const int C = (int)1e1 + 9;
const int P = (int)1e5 + 7;
int p[] = {2,  3,  5,  7,  11, 13, 17, 19, 23, 29,
           31, 37, 41, 43, 47, 53, 59, 61, 67};
int mul(int a, int b) { return (a * 1ll * b) % MOD; }
int sum(int a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
  return a;
}
int state[N], two[P];
void precalc() {
  two[0] = 1;
  for (int i = 1; i < P; i++) two[i] = mul(two[i - 1], 2);
  for (int x = 2; x < N; x++) {
    int mask = 0, c[N];
    fill(c, c + N, 0);
    int cur = x;
    for (int j = 2; j <= x; j++) {
      if (cur % j == 0) {
        while (cur % j == 0) {
          c[j]++;
          cur /= j;
        }
      }
    }
    if (cur > 1) c[cur]++;
    for (int i = 0; i < C; i++) {
      if (c[p[i]] & 1) mask |= (1 << i);
    }
    state[x] = mask;
  }
}
int cnt[N], dp[2][1 << C];
int main() {
  precalc();
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    cnt[x]++;
  }
  dp[0][0] = 1;
  for (int i = 1; i < N; i++) {
    int now = (i & 1), prev = (now ^ 1);
    for (int mask = 0; mask < (1 << C); mask++) {
      dp[now][mask] = 0;
      if (cnt[i] == 0) {
        dp[now][mask] = dp[prev][mask];
      } else {
        int cur = state[i], all = two[cnt[i] - 1];
        dp[now][mask] = sum(dp[now][mask], mul(dp[prev][mask], all));
        dp[now][mask] = sum(dp[now][mask], mul(dp[prev][mask ^ cur], all));
      }
    }
  }
  printf("%d", ((dp[0][0] - 1) + MOD) % MOD);
  return 0;
}
