	
#include <bits/stdc++.h>
using namespace std;

// loops
#define fora(i,a,b) for(int i=a;i<=b;++i)
#define forb(i,a,b) for(int i=a;i>=b;--i)
#define forc(i,a,b) for(int i=a;i<b;++i)
#define For(x,y) for(auto x : y)

// data structure
#define ii pair<int,int>
#define fi first
#define se second
#define pb push_back
#define sz(a) (int)a.size()
const int N = 2005;
int a[N];
int n;
map<int,int> mp;
signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cin >> n;
	fora(i,1,n){
		cin >> a[i];
	} 	
	sort(a+1,a+n+1);
	fora(i,1,n){
		for(int j = 1;j * j <= a[i];++j){
			if (a[i] % j == 0){
				mp[j] = __gcd(mp[j],a[i]);
				mp[a[i]/j] = __gcd(mp[a[i]/j],a[i]);
			}
		}
	}
	int ans = 0;
	For(x,mp){
		if (x.fi > a[1]) break;
		if (x.fi == x.se) ++ans;
	}
	cout << ans << "\n";
}
#include<bits/stdc++.h>
using namespace std;

bool check(int k, int n, vector<int> &v)
{
    vector<int> vk;
    for (int x: v)
    {
        if (x%k == 0)
            vk.push_back(x);
        
        if (k > x)
            return false;
    }
    
    if (vk.size() == 0)
        return false;
    
    int G = vk[0];
    for (int x: vk)
        G = __gcd(G, x);
    
    if (G != k)
        return false;
    
    return true;
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    
    int n;
    cin >> n;
    vector<int> v(n);
    for (int i=0; i<n; i++)
        cin >> v[i];
    
    set<int> possibles;
    for (int i=0; i<n; i++)
    {
        int x = v[i];
        for (int i=1; i*i<=x; i++)
            if (x%i == 0)
                possibles.insert(i), possibles.insert(x/i);
    }
    
    int sum = 0;
    for (int x: possibles)
        sum += check(x, n, v);
    
    cout << sum << '\n';
}
