#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n; vector as(n); for(Int i=0;i>as[i]; Int ans=0; for(Int l=0;l dp; dp[as[l]]=1; for(Int i=l+1;i nx; for(auto p:dp) nx[__gcd(p.first,as[i])]+=p.second; for(auto p:nx) dp[p.first]+=p.second; } ans+=dp[1]; } cout<