#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <string>
#include <map>
#include <queue>
#include <bitset>
#include <vector>
#include <stack>
#include <cstdlib>
#include <set>
#define mp make_pair
#define pb push_back
#define mem(i,a) memset(i,a,sizeof(i))
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double db;
#define pii pair<ll,ll>
const ll INF=1000000007;
const ll DMAX=1000000+15;
const ll MOD=10000007;
template<class T> inline void read(T &x){
    x=0; 
    T f=1;
    char ch=getchar();
    while(ch<'0' || ch>'9'){
        if(ch=='-'){
            f=-1;
        }
        ch=getchar();
    }
    while(ch<='9' && ch>='0'){
        x=x*10+(ch-'0');
        ch=getchar();
    }
    x*=f;
}
template<class T> void print(T x){
    if(x<0){
        putchar('-');
        x=-x;
    }
    int a[20];
    int cnt=0;  
    do{
        a[++cnt]=x%10;
        x/=10;
    }while(x>0);
    for(int i=cnt;i>=1;i--){
        putchar(a[i]+'0');
    }
    puts("");
}
int n;
ll a[2002];
map<ll,ll> ma;
ll lp[DMAX],cnt=0;
int main(){
    read(n);
    ll mx=INF;
    for(int i=1;i<=n;i++){
        read(a[i]);
        mx=min(mx,a[i]);
    }
    ma.clear();
    for(int i=1;i<=n;i++){
        for(int j=1;j<=sqrt(a[i]);j++){
            if(a[i]%j==0){
                if(ma[j]==0){
                    ma[j]=a[i];
                    lp[++cnt]=j;
                }
                else{
                    ma[j]=__gcd(ma[j],a[i]);
                }
                ll plo=a[i]/j;
                if(ma[plo]==0){
                    ma[plo]=a[i];
                    lp[++cnt]=plo;
                }
                else{
                    ma[plo]=__gcd(ma[plo],a[i]);
                }
            }
        }
    }
    ll ans=0;
    for(int i=1;i<=cnt;i++){
        if(ma[lp[i]]==lp[i] && lp[i]<=mx){
            ans++;
        }
    }
    print(ans);
    return 0;
}   
#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 4000000000000000000 //オーバーフローに注意
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;




//最大公約数
ll gcd(ll x,ll y){

	x = abs(x);
	y = abs(y);

	if(x < y){
		swap(x,y);
	}
	if(y == 0){
		return x;
	}else{
		return gcd(y,x%y);
	}
}

map<ll,ll> MAP;

void func(ll num,ll base){

	auto at = MAP.find(base);
	if(at == MAP.end()){

		MAP[base] = num;
	}else{

		ll tmp = MAP[base];
		MAP[base] = gcd(tmp,num);
	}
}


int main(){

	int N;
	scanf("%d",&N);

	ll A;
	ll mini = HUGE_NUM;

	for(int i = 0; i < N; i++){

		scanf("%lld",&A);
		mini = min(mini,A);

		for(ll k = 1; k*k <= A; k++){
			if(A%k != 0)continue;

			func(A,k);
			func(A,A/k);
		}
	}

	int ans = 1;
	for(auto at = MAP.begin(); at != MAP.end(); at++){

		if(at->first < mini && at->first == at->second){

			ans++;
		}
	}

	printf("%d\n",ans);

	return 0;
}
