#include <bits/stdc++.h>
using namespace std;
long long dp[1 << 21];
long long tmp[1 << 21];
int a[100005];
long long po[100005];
int fq[75][25];
int rk[75];
int odd[75];
int even[75];
int get(int u, int v) {
  int w = 0;
  for (int i = 0; i < 20; i++)
    if ((u & (1 << i)) != (v & (1 << i))) w |= (1 << i);
  return w;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int u;
    scanf("%d", &u);
    a[u]++;
  }
  po[0] = 1;
  for (int i = 1; i < 100005; i++) po[i] = (po[i - 1] * 2LL) % 1000000007;
  int q = 0;
  for (int i = 2; i <= 70; i++) {
    bool f = 1;
    for (int j = 2; j * j <= i; j++)
      if (i % j == 0) f = 0;
    if (f) rk[i] = q++;
  }
  for (int i = 2; i <= 70; i++) {
    int j = i;
    while (j % 2 == 0) {
      fq[i][rk[2]]++;
      j /= 2;
    }
    for (int k = 3; k * k <= j; k += 2)
      while (j % k == 0) {
        fq[i][rk[k]]++;
        j /= k;
      }
    if (j > 1) fq[i][rk[j]]++;
    for (int k = 0; k < 20; k++)
      if (fq[i][k] % 2) odd[i] |= (1 << k);
  }
  for (int i = 2; i <= 70; i++)
    if (a[i]) {
      long long c1 = po[a[i] - 1] - 1;
      long long c2 = po[a[i] - 1];
      for (int j = 0; j < (1 << 19); j++) {
        tmp[j] = (tmp[j] + (dp[j] * c1) % 1000000007) % 1000000007;
        int ch = get(odd[i], j);
        tmp[ch] = (tmp[ch] + (dp[j] * c2) % 1000000007) % 1000000007;
      }
      for (int j = 0; j < (1 << 19); j++) {
        dp[j] = (dp[j] + tmp[j]) % 1000000007;
        tmp[j] = 0;
      }
      dp[0] = (dp[0] + c1) % 1000000007;
      dp[odd[i]] = (dp[odd[i]] + c2) % 1000000007;
    }
  cout << (dp[0] + (((dp[0] + 1) % 1000000007) * (po[a[1]] - 1)) % 1000000007) %
              1000000007
       << endl;
}
