#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int MOD = 1e9 + 7;
int a[N];
int cnt[75];
int dp[75][(1 << 19) + 5];
int s[75];
int prime[19] = {2,  3,  5,  7,  11, 13, 17, 19, 23, 29,
                 31, 37, 41, 43, 47, 53, 59, 61, 67};
int _2p[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  for (int i = 1; i <= 70; i++) {
    int t = i;
    for (int j = 0; j < 19; j++) {
      while (t % prime[j] == 0) t /= prime[j], s[i] ^= (1 << j);
    }
  }
  _2p[0] = 1;
  for (int i = 1; i < N; i++) {
    _2p[i] = (_2p[i - 1] * 2) % MOD;
  }
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i], cnt[a[i]]++;
  dp[0][0] = 1;
  for (int i = 1; i <= 70; i++) {
    if (!cnt[i]) {
      for (int j = 0; j < (1 << 19); j++) dp[i][j] = dp[i - 1][j];
    } else {
      for (int j = 0; j < (1 << 19); j++) {
        dp[i][j ^ s[i]] = ((long long)dp[i][j ^ s[i]] +
                           (long long)_2p[cnt[i] - 1] * dp[i - 1][j]) %
                          MOD;
        dp[i][j] =
            ((long long)dp[i][j] + (long long)_2p[cnt[i] - 1] * dp[i - 1][j]) %
            MOD;
      }
    }
  }
  cout << (dp[70][0] - 1) % MOD << endl;
  return 0;
}
