#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
#define rep(i,m,n) for(int i=m;i<n;i++)
const ll mod=1e9+7;

int main(){
  int n;
  cin>>n;
  int a[n];
  rep(i,0,n) cin>>a[i];
  int b=a[0];
  rep(i,1,n) b=gcd(b,a[i]);
  if(b!=1) cout<<"not coprime"<<endl;
  else{
    set<int> s;
    bool p=true;
    rep(i,0,n){
      int c=a[i];
      for(int j=2;j*j<=a[i];j++){
        if(c%j==0){
          if(s.count(j)){
            p=false;
            //break;
          }
          else{
            s.insert(j);
            while(c%j==0) c/=j;
          }
        }
      }
      //if(!p) break;
      if(c!=1){
        if(s.count(c)){
          p=false;
          //break;
        }
        else s.insert(c);
      }
    }
    if(p) cout<<"pairwise coprime"<<endl;
    else cout<<"setwise coprime"<<endl;
  }
}