#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mk make_pair
#define mod 1000000007
ll gcd(ll a,ll b){
    if(b==0)
     return a;
    return gcd(b,a%b);
}
bool prime(ll n){
    for(int i=2;i<=sqrt(n);i++){
        if(n%i==0)
         return false;
    }
    return true;
}
int main(){
  
  
  
  ll n;
  cin>>n;
  vector<ll> ans(n);
  ll c=0,g=0,flag=0;
  for(ll i=0;i<n;i++){
        cin>>ans[i];
    }  
  for(ll i=0;i<n;i++){
       g=gcd(g,ans[i]);
       if(prime(arr[i]))
         c++;
  }
  if(g!=1)
    cout<<"not coprime"<<endl;
  else if(c==n){
      cout<<"pairwise coprime"<<endl;
    }
   else 
      cout<<"setwise coprime"<<endl;
   
 
  
}