#include <bits/stdc++.h>
#define fastIO ios::sync_with_stdio(0); cin.tie(NULL);
typedef long long ll;
using namespace std;


int main(){
    fastIO
    ll n; cin>>n;
    ll gc = 0;
    ll a[n];
    bool coprime = true;
    for(int i=0; i<n; i++) cin>>a[i];
    for(int i=0; i<n; i++){
      gc = __gcd(gc,a[i]);
      if(i>0){
        ll v = __gcd(a[i], a[i-1]);
        if(v > 1){
          coprime = false;
        }
      }
      //cout<<"gcd-> "<<gc<<endl;
    }
    
    if(gc == 1 && coprime){
      cout<<"pairwise coprime";
    }
    else if(gc == 1 && !coprime){
      cout<<"setwise coprime";
    }
    else{
      cout<<"not coprime";
    }
 
    return 0;
}