#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 2;
const long long LEN = 19, mod = 1e9 + 7;
long long n, u, cnt[80];
int nmask[80];
vector<int> primes;
int dp[71][1 << LEN];
bool checkPrime(int n) {
  if (n < 2) return false;
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
long long power(long long a, long long b, long long p = mod) {
  long long ret = 1;
  a %= p;
  while (b > 0) {
    if (b % 2 == 1) ret = ret * a % p;
    b /= 2;
    a = a * a % p;
  }
  return ret;
}
int go(int id, int prod) {
  if (id > 70) return __builtin_popcountll(prod) == 0;
  int &ans = dp[id][prod];
  if (~ans) return ans;
  int newProd = nmask[id] ^ prod;
  long long c1 = 0;
  if (cnt[id] != 0) c1 = (power(2LL, cnt[id] - 1) * go(id + 1, newProd)) % mod;
  long long c2 = 0;
  if (cnt[id] != 0)
    c2 = (power(2LL, cnt[id] - 1) * go(id + 1, prod)) % mod;
  else
    c2 = go(id + 1, prod) % mod;
  return ans = (c1 + c2) % mod;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  memset(dp, -1, sizeof(dp));
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> u;
    cnt[u]++;
  }
  for (int x = 2; x <= 70; x++)
    if (checkPrime(x)) primes.push_back(x);
  for (int x = 2; x <= 70; x++) {
    int num = x, mask = 0;
    for (int i = 0; i <= (int)(primes.size()) - 1; i++) {
      int cnt = 0;
      while (num % primes[i] == 0) ++cnt, num /= primes[i];
      mask |= (cnt % 2) << i;
    }
    nmask[x] = mask;
  }
  int ans = go(1, 0) - 1;
  cout << ans;
}
