#include<bits/stdc++.h>
#include<iostream>
#include<string>
#include<cmath>
#include<cstdio>
#include<cctype>
#include<cstring>
#include<iomanip>
#include<cstdlib>
#include<ctime>
#include<set>
#include<map>
#include<utility>
#include<queue>
#include<vector>
#include<stack>
#include<sstream>
#include<algorithm>
/************************************************/
#define rep(i,n) for(int i=0;i<n;i++)
#define m_p make_pair
#define pb push_back
#define fr first
#define se second
#define ford(i,n) for(int i=n-1;i>=0;i--)
#define forn(i,a,n) for(int i=a;i<n;i++)
#define foreach(i,c) for(__typeof(c.begin())i=(c.begin());i!=(c).end();i++)
#define pii pair<int,int>
#define vi vector<int>
#define ll long long
#define vll vector<ll>
#define sz(s) (int)(s.size())
#define all(s) s.begin(),s.end()
#define zero(x) memset(x,0,sizeof(x))
#define vii vector<pair<int,int> >
#define mpis map<int,string>
#define mpii map<int,int>
#define mpsi map<string,int>
#define re return
#define mod 1000000007
/************************************************/
using namespace std;

long long get(){
	char c=getchar();
	long long x=0LL;
	while(c<'0'||c>'9')
	c=getchar();
	while(c>='0'&&c<='9'){
		x*=10LL;
		x+=(c-'0');
		c=getchar();
	}
	return x;
}
string i_t_s(int x){
	string t="";
	while(x){
		t+=x%10+'0';
		x/=10;
	}
	reverse(all(t));
	re t;
}
int s_t_i(string t){
	int x=0;
	rep(i,sz(t)){
		x=x*10+(t[i]-'0');
	}
	re x;
}
ll q_p(ll x,ll y){
	ll res=1;
	x%=mod;
	while(y){
		if(y%2){
			res=res*x;
			res%=mod;
		}
		y/=2;
		x=x*x;
		x%=mod;
	}
	re res;
}
int n;
int a[2001];
set<int>s;
int mn=1e9;
int main(){
	ios::sync_with_stdio(0);
	scanf("%d",&n); 
	rep(i,n)
	scanf("%d",&a[i]);
	rep(i,n)
	mn=min(mn,a[i]);
	int ans=0;
	rep(i,n){
		for(int j=1;j*j<=a[i];j++){
			if(a[i]%j)
			continue;
			if(j>mn)
			break;
			s.insert(j);
			s.insert(a[i]/j);
		}
	}
	set<int> ::iterator it;
	for(it=s.begin();it!=s.end();it++){
		if((*it)>mn)
		break;
		int now=0;
		rep(i,n)
		if(a[i]%(*it)==0)
		now=__gcd(now,a[i]);
		if(now==(*it)&&now<=mn)
		ans++;
	}
	cout<<ans;
	re 0;
}
/*
检查循环是rep(i,n)还是rep(i,m)!!
*/

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
using namespace std;
int gcd(int x,int y){
    if(x<y) swap(x,y);
    if(y==0) return x;
    return gcd(x%y,y);
}

set<int> s;
vector<int> a;
int main(){
    int i,j,n; cin >> n;
    a.resize(n);
    for(i=0;i<n;i++) cin >> a[i];
    sort(a.begin(),a.end());
    a.erase(unique(a.begin(),a.end()),a.end());
    int mn = a[0];
    for(i=0;i<a.size();i++){
        for(j=1;j*j<=a[i];j++){
            if(j>mn) break;
            if(a[i]%j==0){
                s.insert(j);
                if(a[i]/j<=mn) s.insert(a[i]/j);
            }
        }
    }
    int ans = 0;
    for(int x:s){
        int y = 0;
        for(i=0;i<a.size();i++){
            if(a[i]%x==0) y = gcd(y,a[i]);
        }
        if(x==y) ans++;
    }
    cout << ans << endl;
}