#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int a[71];
int dp[2][(1 << 19)];
int dv[100010];
int rt[71];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  dv[0] = 1;
  for (int i = 1; i < 100010; i++) {
    dv[i] = (1ll * (dv[i - 1] << 1)) % mod;
  }
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int u;
    cin >> u;
    a[u]++;
  }
  vector<int> pr = {2};
  for (int i = 3; i < 71; i++) {
    int b = 1;
    for (int j = 2; j < i; j++) {
      if (i % j == 0) {
        b = 0;
      }
    }
    if (b) {
      pr.push_back(i);
    }
  }
  dp[0][0] = 1;
  for (int i = 1; i < 71; i++) {
    int nw = i;
    for (int j = 0; j < 19; j++) {
      while ((nw % pr[j]) == 0) {
        rt[i] ^= (1 << j);
        nw /= pr[j];
      }
    }
  }
  for (int i = 0; i < 70; i++) {
    for (int j = 0; j < (1 << 19); j++) {
      if (a[i + 1] == 0) {
        dp[1][j] += dp[0][j];
        dp[1][j] %= mod;
        continue;
      }
      dp[1][j] += (1ll * dp[0][j] * dv[a[i + 1] - 1]) % mod;
      dp[1][j] %= mod;
      dp[1][j ^ rt[i + 1]] += (1ll * dp[0][j] * dv[a[i + 1] - 1]) % mod;
      dp[1][j ^ rt[i + 1]] %= mod;
    }
    for (int j = 0; j < (1 << 19); j++) {
      dp[0][j] = dp[1][j];
      dp[1][j] = 0;
    }
  }
  cout << dp[0][0] - 1;
}
