#include using namespace std; #define REP(i,x,y) for(ll i=x; i<=y; i++) #define BIT(t) ((long long 1) << t) #define PER(i,y,x) for(ll i=y; i>=x; i--) #define SIZE(v) ll(v.size()) #define vll vector #define vvll vector> #define pll pair #define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() ); typedef long long ll; void f(ll y, set& st){ ll x = y; for(int i=1;i*i<=x;i++){ if(y % i == 0){ st.insert(i); st.insert(y/i); } } } int main(){ ll n; cin >> n; vll a; REP(i,1,n){ ll x; cin >> x; a.push_back(x); } set st; REP(i,0,n-1){ f(a[i], st); } vll v; for(auto x:st){ v.push_back(x); } reverse(v.begin(), v.end()); vll num(v.size()); for(int i=0;i