#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 v;
    bool coprime = true;
    for(int i=0; i<n; i++){
      cin>>v;
      gc = __gcd(gc,v);
      if(gc>1 && i>0)
        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;
}