#include <bits/stdc++.h>
#include <unordered_map>
using namespace std;
//define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
#define debug(x) cout << #x << '\t' << x << endl
#else
#define debug(x)
#endif
typedef long long ll;
typedef unsigned long long ull;
const ll mod = 1e9 + 7;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
#define fast                     \
    ios::sync_with_stdio(false); \
    cin.tie(0);                  \
    cout.tie(0)
typedef pair<int, int> pii;
const int INF = 0x3f3f3f3f;
#define lowbit(x) ((x) & -(x))
#define mem(a, b) memset(a, b, sizeof(a))
#define PI acos(-1)
#define endl '\n'
#define lson l, mid, rt << 1
#define rson mid + 1, r, rt << 1 | 1
// #define int long long
const double eps = 1e-4;
ll gcd(ll a, ll b){a = abs(a);b = abs(b);return a == 0 ? b : gcd(b % a, a);}
//inline ll Pow(ll a, ll n, ll MOD) { ll t = 1; a %= MOD; while (n > 0) { if (n & 1) t = t * a % MOD; a = a * a % MOD, n >>= 1; } return t % MOD; }
const int maxn = 5e5+100;

signed main()
{
    #ifndef ONLINE_JUDGE
        freopen("in.txt", "r", stdin);
    // freopen("out.txt", "w", stdout);
    #endif
    fast;
    int n;
    cin>>n;
    vector<int> a(n);
    map<int,int> mp;
    for(auto &v: a) cin>>v;
    for(auto v: a){
        for(int i = 1; i*i <= v; i++){
            if(v%i==0){
                mp[i] = gcd(mp[i],v);
                mp[v/i] = gcd(mp[v/i],v);
                debug(mp[i]);
                debug(mp[v/i]);
            }
        }
    }
    int ans = 1;
    int minn = *min_element(a.begin(),a.end());
    for(auto p :mp){
        if(p.first==p.second&&p.first<minn){
            ans++;
        }
    }
    cout<<ans<<endl;
    return 0;
}
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 2000 + 7;
int n, a[N];
bool b[N];

bool ok(int val) {
        int g = 0;
        for (int i = 1; i <= n; i++) {
                if (a[i] % val == 0) g = __gcd(g, a[i]);


        }
        return g == val;
}

mt19937 rng((long long) (new char));

signed main() {
        ios::sync_with_stdio(0); cin.tie(0);

       /// freopen ("input", "r", stdin);

        cin >> n;
        for (int i = 1; i <= n; i++)
                cin >> a[i];
        sort(a + 1, a + n + 1);
        int y = 0;
        for (int i = 1; i <= n; i++)
                if (y == 0 || a[y] != a[i])
                        a[++y] = a[i];
        n = y;
        shuffle(a + 2, a + n + 1, rng);
        int cnt = 0;
        set<int> st;
        for (int i = 1; i <= n; i++)
                for (int j = i; j <= n; j++)
                        st.insert(__gcd(a[i], a[j]));
        cnt += n * n;
        for (int i = 1; i <= n; i++) {
                int rad = sqrt(a[i]) + 1;
                cnt += rad;
                if (cnt >= (int) 5e7)
                        break;
                for (int d = 1; d <= rad; d++)
                        if (a[i] % d == 0) {
                                st.insert(d);
                                st.insert(a[i] / d);
                        }
        }
        int ret = 0;
        for (auto &x : st) {
                if (a[1] < x)
                        continue;
                if (ok(x))
                        ret++;

        }
        cout << ret << "\n";

}


