#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 7;
long long dp[3][1 << 20], mask[71], n;
int sl[72];
const long long mod = 1e9 + 7;
bool nto(int x) {
  for (int i = 2; i <= sqrt(x); i++)
    if (x % i == 0) return 0;
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i <= 71; i++) sl[i] = 0;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    if (sl[x] == 0)
      sl[x] = 1;
    else
      sl[x] = (sl[x] * 2) % mod;
  }
  int dem = 0;
  for (int i = 2; i <= 71; i++)
    if (nto(i)) {
      for (int j = 1; j <= 71; j++) {
        int tmp = j;
        while (tmp % i == 0) {
          tmp /= i;
          mask[j] ^= (1 << dem);
        }
      }
      dem++;
    }
  dp[0][0] = 1;
  for (int i = 0; i <= 70; i++) {
    int tt1, tt2;
    if (i % 2 == 0)
      tt1 = 1, tt2 = 0;
    else
      tt1 = 0, tt2 = 1;
    int sl1 = sl[i];
    int sl2 = (sl[i] == 0) ? 1 : sl[i];
    for (int tt = 0; tt <= (1 << 20) - 1; tt++) {
      dp[tt1][tt ^ mask[i]] = (dp[tt1][tt ^ mask[i]] + dp[tt2][tt] * sl1) % mod;
      dp[tt1][tt] = (dp[tt1][tt] + dp[tt2][tt] * sl2) % mod;
    }
    for (int tt = 0; tt <= (1 << 20) - 1; tt++) dp[tt2][tt] = 0;
  }
  cout << (dp[1][0] - 1 + mod) % mod << endl;
}
