文件目录

#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> v;
int n, a;
int gcd(int a, int b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
void addv(int a)
{
    for (int i = 0; i < v.size(); i++)
    {
        vector<int> k = v[i];
        bool f = true;
        for (int j = 0; j < k.size(); j++)
            if (gcd(k[j], a) != 1)
            {
                f = false;
                break;
            }
        if (f)
        {
            v[i].push_back(a);
            return;
        }
    }
    vector<int> k = {a};
    v.push_back(k);
}
int main()
{
    cin >> n;
    while (n--)
    {
        cin >> a;
        addv(a);
    }
    cout << v.size();
    return 0;
}