#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void chmin(T &a, const T &val) {
  if (a > val) a = val;
}
template <class T>
inline void chmax(T &a, const T &val) {
  if (a < val) a = val;
}
template <class T>
long long sqr(T a) {
  return 1ll * a * a;
}
template <class T>
void compress(T &a) {
  sort(a.begin(), a.end());
  a.resize(unique(a.begin(), a.end()) - a.begin());
}
const double pi = acos(-1.00);
const double eps = 1e-6;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const int dx[4] = {0, 0, -1, 1};
const int dy[4] = {-1, 1, 0, 0};
int m, cnt[71], s[71];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> m;
  for (int i = 1; i <= m; i++) {
    int x;
    cin >> x;
    cnt[x]++;
  }
  vector<int> p;
  auto isPrime = [&](int x) {
    for (int i = 2; i * i <= x; i++)
      if (x % i == 0) return false;
    return true;
  };
  for (int i = 2; i <= 70; i++) {
    if (isPrime(i)) p.push_back(i);
  }
  for (int i = 1; i <= 70; i++) {
    int mask = 0;
    int x = i;
    for (int j = 0; j < p.size(); j++) {
      int y = p[j];
      while (x % y == 0) {
        x /= y;
        mask ^= (1 << j);
      }
    }
    s[i] = mask;
  }
  vector<int> P2(m + 1, 1);
  for (int i = 1; i <= m; i++) P2[i] = P2[i - 1] * 2 % MOD;
  int n = p.size();
  vector<vector<int>> dp(71, vector<int>(1 << n, 0));
  dp[0][0] = 1;
  for (int i = 1; i <= 70; i++) {
    for (int mask = 0; mask < (1 << n); mask++) {
      if (cnt[i] == 0) {
        dp[i][mask] += dp[i - 1][mask];
        dp[i][mask] %= MOD;
      } else {
        dp[i][mask] += 1ll * dp[i - 1][mask] * P2[cnt[i] - 1] % MOD;
        dp[i][mask] %= MOD;
        dp[i][mask] += 1ll * dp[i - 1][mask ^ s[i]] * P2[cnt[i] - 1] % MOD;
        dp[i][mask] %= MOD;
      }
    }
  }
  cout << (dp[70][0] - 1 + MOD) % MOD;
  return 0;
}
