#include #include #include using namespace std; vector divisor(int n){ vector res; for(int i=1; i*i<=n; i++){ if(n%i == 0){ res.push_back(i); if(i != 1 && i != (n/i)){ res.push_back(n/i); } } } return res; } int main(void){ int n, a[100005]; cin >> n; for(int i=0; i> a[i]; } sort(a, a+n); int dp[1000006]; fill(dp, dp+1000006, 0); int m = 1; dp[a[0]] = 1; for(int i=1; i res = divisor(a[i]); for(int j=0; j