#include <bits/stdc++.h>
const long long SZ = 1e5 + 1984;
const long long inf = 1e18;
const long long MOD = 1e9 + 7;
const long long MD = 998244353;
long long opnmbr = 1;
using namespace std;
long long powermod(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % MOD;
    b = b / 2;
    a = (a * a) % MOD;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long cnt[71];
long long dp[1 << 19];
long long dp2[1 << 19];
long long primes[19] = {2,  3,  5,  7,  11, 13, 17, 19, 23, 29,
                        31, 37, 41, 43, 47, 53, 59, 61, 67};
long long getMask(long long a) {
  long long mask = 0;
  for (long long i = 0; i < (19); i++) {
    while (a % primes[i] == 0) {
      mask ^= (1 << i);
      a /= primes[i];
    }
  }
  return mask;
}
void krdiyasuru() {
  long long n;
  cin >> n;
  for (long long i = 0; i < (n); i++) {
    long long a;
    cin >> a;
    cnt[a]++;
  }
  long long pw[SZ];
  pw[0] = 1;
  for (long long i = 1; i < (SZ); i++) {
    pw[i] = (2 * pw[i - 1]) % MOD;
  }
  dp[0] = 1;
  for (long long i = 1; i < (71); i++) {
    long long mask = getMask(i);
    for (long long j = 0; j < (1 << 19); j++) {
      dp2[j] = dp[j];
      dp[j] = 0;
    }
    for (long long j = 0; j < (1 << 19); j++) {
      dp[j] += dp2[j] * ((cnt[i] == 0) ? 1 : pw[cnt[i] - 1]);
      dp[j] %= MOD;
      dp[j ^ mask] += dp2[j] * ((cnt[i] == 0) ? 0 : pw[cnt[i] - 1]);
      dp[j ^ mask] %= MOD;
    }
  }
  cout << dp[0] - 1 << endl;
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  { krdiyasuru(); }
}
