#include using namespace std; #include #define rep(i,a,b) for(int i=(a);i<(b);i++) #define ll long long #define pll pair #define pii pair #define pb push_back #define mk make_pair #define F first #define S second #define mod 1000000007 #define MAXN 1000001 #define inf 1e18 #define wh while vector p(ll n) { vectorans; while (n%2 == 0) { ans.pb(2); n = n/2; } for (ll i = 3; i <= sqrt(n); i = i+2) { while (n%i == 0) { ans.pb(i); n = n/i; } } if (n > 2) ans.pb(n); return ans; } int main() { ll n; cin>>n; ll a[n+1]; rep(i,1,n+1) cin>>a[i]; ll dp[MAXN]; ll fans=0; for(ll i=1;ians; ans=p(a[i]); ll t=a[i]; ll temp=0; for(ll j=0;j