#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 101; 
map<int,int>f;
int n, a[N];
set<int>s;
set<int>::iterator it;
signed main()
{
	scanf("%d",&n);
	for(int i = 1;i <= n; i++) scanf("%d",&a[i]);
	sort(a + 1,a + n + 1);
	int ans = 1;
	for(int i = 1;i <= n; i++)
		for(int j = 1;j * j <= a[i]; j++)
		{
			if(a[i] % j == 0)
			{
				if(!f[j] && j < a[1]) f[j] = a[i];
				if(j < a[1]) f[j] = __gcd(f[j],a[i]),s.insert(j);
				if(j * j == a[i]) continue;
				if(!f[a[i]/j] && a[i]/j < a[1]) f[a[i]/j] = a[i];
				if((a[i]/j) < a[1]) f[a[i]/j] = __gcd(a[i],f[a[i]/j]),s.insert(a[i]/j); 
			} 
		}
	for(it = s.begin();it != s.end(); it++) 
	    if(f[*it] == *it) ++ ans;
 	cout << ans;
}
 
#include <bits/stdc++.h>
using namespace std;

template<typename T>
void out(T x) { cout << x << endl; exit(0); }
#define watch(x) cout << (#x) << " is " << (x) << endl





using ll = long long;


const int maxn = 1e6 + 5;



const int inf = 2e9;


int main() {
    ios_base::sync_with_stdio(false); cin.tie(0);  cout.tie(0);

    int n;
    cin>>n;
    vector<int> a(n);
    for (int i=0; i<n; i++) {
	cin>>a[i];
    }

    set<int> facs;

    for (int x: a) {
	for (int i=1; i*i<=x; i++) {
	    if (x%i==0) {
		facs.insert(i);
		facs.insert(x/i);
	    }
	}
    }

    int res = 0;
    for (int f: facs) {
	int cur = 0;
	int lo = inf;
	for (int x: a) {
	    if (x%f==0) {
		cur = __gcd(cur, x);
	    } else {
		lo = min(lo, x);
	    }
	}
	//cout<<f<<": "<<cur<<endl;
	if (f <= lo && cur==f) {
	    res++;
	}
    }


    out(res);    
    
    return 0;
}
