#include <bits/stdc++.h>
using namespace std;
int n, aux[1 << 20], a, v[] = {0,  2,  3,  5,  7,  11, 13, 17, 19, 23,
                               29, 31, 37, 41, 43, 47, 53, 59, 61, 67};
long long nrpos[2][1 << 20], f[2][75];
int main() {
  int i, j, val, nr;
  std::ios::sync_with_stdio(false);
  cin >> n;
  for (i = 1; i <= 70; i++) f[0][i] = 1;
  for (i = 1; i <= n; i++) {
    cin >> a;
    f[0][a] = f[1][a] = (f[0][a] + f[1][a]) % 1000000007;
  }
  for (i = 1; i <= 70; i++) {
    val = i;
    for (j = 1; j <= 19; j++) {
      nr = 0;
      while (val % v[j] == 0) {
        nr++;
        val /= v[j];
      }
      if (nr % 2) aux[i] |= ((1 << j) % 1000000007);
    }
  }
  nrpos[0][0] = 1;
  for (i = 1; i <= 70; i++) {
    int i1 = i % 2, i2 = 1 - i % 2;
    for (j = 0; j < (1 << 20); j++) {
      nrpos[i1][j] = (nrpos[i1][j] + (nrpos[i2][j] * f[0][i])) % 1000000007;
      nrpos[i1][j ^ aux[i]] =
          (nrpos[i1][j ^ aux[i]] + (nrpos[i2][j] * f[1][i])) % 1000000007;
    }
    for (j = 0; j < (1 << 20); j++) nrpos[i2][j] = 0;
  }
  cout << (nrpos[0][0] - 1 + 1000000007) % 1000000007;
  return 0;
}
