#include <bits/stdc++.h>
using namespace std;
int dp[71][(1 << 19) + 5];
int primes[] = {2,  3,  5,  7,  11, 13, 17, 19, 23, 29,
                31, 37, 41, 43, 47, 53, 59, 61, 67};
int factor[75][20], cnt[75];
long long pw[100005];
int rec(int pos, int mask) {
  if (pos > 70) return mask == 0;
  int &ret = dp[pos][mask];
  if (ret != -1) return ret;
  ret = 0;
  if (cnt[pos] == 0) return ret = rec(pos + 1, mask);
  int tmp = mask;
  long long r = 0;
  for (int i = 0; i < 19; i++)
    if (factor[pos][i]) tmp ^= (1 << i);
  r = (pw[cnt[pos] - 1] * rec(pos + 1, tmp)) % 1000000007;
  r = (r + ((pw[cnt[pos] - 1] * rec(pos + 1, mask)) % 1000000007)) % 1000000007;
  ret = r;
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, x;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x, cnt[x]++;
  for (int i = 2; i <= 70; i++) {
    int num = i;
    for (int j = 0; j < 19 and num > 1; j++) {
      int t = 0;
      while (num % primes[j] == 0) num /= primes[j], t++;
      factor[i][j] = t & 1;
    }
  }
  pw[0] = 1;
  for (int i = 1; i < 100003; i++) pw[i] = (2 * pw[i - 1]) % 1000000007;
  memset(dp, -1, sizeof(dp));
  cout << (rec(1, 0) - 1 + 1000000007) % 1000000007 << endl;
  return 0;
}
