#include <bits/stdc++.h>
using namespace std;
int n;
int mask[72];
long long freq[2][72];
long long dp[2][1 << 20];
bool isprime(int x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
void init() {
  for (int i = 0; i < 72; i++) {
    freq[0][i] = 1;
  }
  int cnt = 0;
  for (int i = 2; i < 72; i++) {
    if (!isprime(i)) continue;
    for (int j = 1; j < 72; j++) {
      int x = j;
      while (x % i == 0) {
        x /= i;
        mask[j] ^= (1 << cnt);
      }
    }
    cnt++;
  }
}
int main() {
  init();
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    freq[0][x] = freq[1][x] = (freq[1][x] + freq[0][x]) % 1000000007;
  }
  dp[0][0] = 1;
  for (int i = 0; i <= 70; i++) {
    int nxt = (i + 1) % 2;
    int cur = i % 2;
    for (int j = 0; j < (1 << 20); j++) {
      dp[nxt][j ^ mask[i]] = dp[nxt][j ^ mask[i]] + dp[cur][j] * freq[1][i];
      dp[nxt][j] = dp[nxt][j] + dp[cur][j] * freq[0][i];
      if (dp[nxt][j ^ mask[i]] >= 1000000007)
        dp[nxt][j ^ mask[i]] %= 1000000007;
      if (dp[nxt][j] >= 1000000007) dp[nxt][j] %= 1000000007;
    }
    for (int j = 0; j < (1 << 20); j++) dp[cur][j] = 0;
  }
  cout << (dp[1][0] - 1 + 1000000007) % 1000000007 << endl;
  return 0;
}
