#include <bits/stdc++.h>

using namespace std;
using Graph = vector<vector<int>>;
using Grid= vector<vector<char>>;
using vin= vector<int>;
using ll=long long;
using vll= vector<ll>;
using vbl=vector<bool>;
using vch=vector<char>;
using pinin=pair<int ,int>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define sort(x) sort(x.begin(), x.end());
#define rese(x) reverse(x.begin(), x.end());

int main() {
    
   int n;
   cin>>n;
   vin a(n);
   rep(i,n){
       cin>>a[i];
   }
   int gc=a[0];
   rep(i,n){
       bool owa=false;
       rep(j,i){
           if(__gcd(a[i], a[j])!=1){
             owa=true;
             break;
           }
       }
       if(owa){
           break;
       }
       if(i==n-1){
           cout<<"pairwise coprime"<<endl;
           return 0;
       }
   }
   rep(i,n){
       gc=__gcd(a[i], gc);
       if(gc==1){
           cout<<"setwise coprime"<<endl;
           return 0;
       }
       
       
       
       
   }
   cout<<"not coprime"<<endl;
   
}
