#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Pld = pair<ld, ld>;
using Vec = vector<ll>;
using VecP = vector<P>;
using VecB = vector<bool>;
using VecC = vector<char>;
using VecD = vector<ld>;
using VecS = vector<string>;
using Graph = vector<VecP>;
#define REP(i, m, n) for(ll (i) = (m); (i) < (n); ++(i))
#define REPR(i, m, n) for(ll (i) = (m); (i) > (n); --(i))
#define rep(i, n) REP(i, 0, n)
#define repr(i, n) REPR(i, n, 0)
#define all(s) (s).begin(), (s).end()
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define in(a) insert(a)
#define P(p) cout<<(p)<<endl;
#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define SORT(a) sort((a).begin(), (a).end())
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<long long int> vll;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
typedef pair<ll, ll> pll;
void sonic(){ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);}
void setp(const ll n){cout << fixed << setprecision(n);}
const ll INF = 1e9+1;
const ll LINF = 1e18+1;
const ll MOD = 998244353;
const ld PI = acos(-1);
template<typename T> void co(const vector<T>& v){for(const auto& e : v)
    { cout << e << " "; } cout << "\n";}
const ld EPS = 1e-11;
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}
template<typename T> void co(T e){cout << e << "\n";}



const int MAX = 510000;

long long fac[MAX], finv[MAX], inv[MAX];

void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}


inline ll ksm(ll a,ll b,const ll m=MOD) {
    int ans = 1;
    while (b) {
        if (b & 1) ans = 1ll * ans * a % m;
        a = 1ll * a * a % m;
        b >>= 1;
    }
    return ans;
}


set<int> divisor(int n) {
    set<int> ret;
    for (int i = 1; i * i <= n; i++) {
        if (n % i == 0) {
            ret.insert(i);
            if (i * i != n) ret.insert(n / i);
        }
    }
    // sort(ret.begin(), ret.end()); // 昇順に並べる
    return ret;
}



int main(){
    int n, ans=0;
    cin>>n;
    vector<int> A;
    set<int> B;
    rep(i,n){
        int l;
        cin>>l;
        A.push_back(l);
        set<int> C;
        C=divisor(l);
        B.insert(C.begin(),C.end());
    }

    for(auto i:B){
        bool flg=false;
        int ret=0;
        int flg2=0;
        rep(j,n){
            if(i>A[j]) {
                flg2 = 1;
                break;
            }
            if(A[j]%i==0){
                if(flg != true){
                    ret = A[j]/i;
                    flg=true;
                }
                else ret = __gcd(ret, A[j]/i);
            }
            }
        if(flg2==0&&ret==1)ans++;
        }

    co(ans);
}

#include<bits/stdc++.h>
#define LL unsigned long long
using namespace std;

const int N=5e5+100;
const LL P=1e9+7; 
int read(){
    int x=0,f=1;char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
    return x*f;
}
void print(LL x){
    if(x>9) print(x/10);
    putchar(x%10+'0');
}

inline int gcd(int a,int b) 
{    
    return b>0 ? gcd(b,a%b):a;
}
void add(LL &x,LL y){
	x+=y;if(x>=P)x-=P;
}
LL qpow(LL x,LL y){
	LL re=1;
	while(y){
		if(y&1) re=re*x%P;
		x=x*x%P;y>>=1;	
	} 
	return re;
}
int n,ans;
int a[2010];
map<int,int> mp;
void add(int x,int y){
	int z=mp[x];
	if(z==x) return;
	z=gcd(z,y);
	mp[x]=z;
	if(z==x) ++ans;
	return;
}
int main(){
	int x;
	scanf("%d",&n);
	for(int i=1;i<=n;++i) scanf("%d",&a[i]);
	sort(a+1,a+1+n);
	ans=0;
	for(int i=1;i<=n;++i) {
		for(int j=1;j<=sqrt(a[i]);++j){
			if(a[i]%j==0){
				if(j<=a[1])add(j,a[i]);
				if(j*j!=a[i]&&(a[i]/j)<=a[1]) add(a[i]/j,a[i]);
			}
		}
	}
	cout<<ans<<endl;
	return 0;
}