#include using namespace std; using ll=long long; using pll=pair; using tll=tuple; using ld=long double; const ll INF=(1ll<<60); #define rep(i,n) for (ll i=0;i<(ll)(n);i++) #define all(v) v.begin(),v.end() template inline bool chmin(T &a,T b){ if(a>b){ a=b; return true; } return false; } template inline bool chmax(T &a,T b){ if(a p(n,1); for(ll i=2;i v; for(ll i=2;i> q; while(q--){ ll a; cin >> a; ll x=a; vector now; ll cnt=0; for(auto i:v){ while(x%i==0){ cnt++; now.push_back(i); if(3