#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define chmin(a, b) ((a)=min((a), (b))) #define chmax(a, b) ((a)=max((a), (b))) #define fs first #define sc second #define eb emplace_back using namespace std; typedef long long ll; typedef pair P; typedef tuple T; const ll MOD=1e9+7; const ll INF=1e18; const double pi=acos(-1); const double eps=1e-10; int dx[]={1, 0, -1, 0}; int dy[]={0, -1, 0, 1}; int main(){ int n; cin>>n; vector x(n); for(int i=0; i>x[i]; sort(x.begin(), x.end()); vector dp(100010, 0); for(int i=0; i v; for(int j=1; j*j<=i; j++){ if(i % j == 0){ v.eb(j); v.eb(i / j); } } for(auto j:v){ if(i != j) dp[i] = max(dp[i], dp[j] + 1); } } } int ans=0; for(int i=0; i