  #include<bits/stdc++.h>
  using namespace std;
  #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  #define ll  long long
  #define ld long double
  #define pb push_back
  #define mp3 make_pair
  #define rep1(i,a,b) for(ll i=a;i<=b;i++)
  #define rep2(i,a,b) for(ll i=a;i<b;i++)
  const ll  mod=1e9+7;
  template<typename T> T pow(T a,T b, long long m){T ans=1; while(b>0){ if(b%2==1) ans=(ans*a)%m; b/=2; a=(a*a)%m; } return ans%m; }
  template<typename T> T add(T a,T b,ll m){a+=b;while(a>=0)a-=m;while(a<0)a+=m; return a;}
  template<typename T> T mul(T a,T b,ll m){return (a*1ll*b)%m;}
 int main(){
   IOS;
   ll n;
   cin>>n;
   ll a[n];
   for(ll i=0;i<n;i++){
     cin>>a[i];
   }
   sort(a,a+n);
   ll t=0;
   for(ll i=1;i<n;i++){
      if(a[i]%a[0]==0){
        t=1;
        break;
      }
   }
   if(t==0)
   cout<<"pairwise coprime";
   else{
     ll ans=a[0];
     for(ll i=1;i<n;i++){
       ans=__gcd(ans,a[i]);
     }
     if(ans==1)
     cout<<"setwise coprime";
     else 
     cout<<"not coprime";
   }
 }