#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  constexpr int A_MAX = 1000000;
  vector<int> min_factor(A_MAX);
  vector<int> q(A_MAX + 1, 1);
  vector<int> primes;
  for (int i = 2; i <= A_MAX; ++i) {
    min_factor[i] = i;
  }
  for (int i = 2; i <= A_MAX; ++i) {
    if (min_factor[i] == i) {
      primes.push_back(i);
    }
    for (int p : primes) {
      int n = i * p;
      if (n > A_MAX) {
        break;
      }
      min_factor[n] = p;
      if (p == min_factor[i]) {
        q[n] = q[i];
        break;
      } else {
        q[n] = i;
      }
    }
  }
  int N;
  cin >> N;
  vector<int> a(A_MAX + 1);
  for (int i = 0; i < N; ++i) {
    int A;
    cin >> A;
    ++a[A];
  }
  return 0;
}
