#include #include #include #include #include #include #include #include #include #include #define mkp make_pair #define mkt make_tuple #define rep(i,n) for(int i = 0; i < (n); ++i) #define all(v) v.begin(),v.end() using namespace std; typedef long long ll; const ll MOD=1e9+7; template void chmin(T &a,const T &b){if(a>b) a=b;} template void chmax(T &a,const T &b){if(a>N>>K; vector A(N); rep(i,N) cin>>A[i]; sort(all(A)); vector isPrime(L+1,1); isPrime[0]=0;isPrime[1]=0; for(int i=2;i<=L;i++){ if(isPrime[i]==0) continue; for(int j=2;i*j<=L;j++) isPrime[i*j]=0; } vector primes; for(int i=2;i<=L;i++) if(isPrime[i]) primes.push_back(i); int V=primes.size(); vector> pcnt(N); rep(i,N){ rep(j,V){ int value=A[i]; while(value%primes[i]==0){ pcnt[i].push_back(primes[i]); value/=primes[i]; } } } map mp; map,int> mulmp; for(int bit=0;bit<(1< v; rep(i,N) if(bit>>i&1) v.push_back(i); int sum=0; for(auto i:v) sum+=A[i]; mp[sum]=1; ll value=1; bool over=false; for(auto i:v){ value*=A[i]; if(value>INF){ over=true; break; } } if(over==false){ mp[value]=1; continue; } vector ps; for(auto i:v){ for(auto n:pcnt[i]) ps.push_back(n); } sort(all(ps)); mulmp[ps]=1; } int ans=mp.size()+mulmp.size(); cout<