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

int main(){
  int n;
  cin>>n;
  vector<int>a(n);
  rep(i,n)cin>>a[i];
  bool ok1=true,ok2=true;
  int g=__gcd(a[0],a[1]);
  rep(i,n)g=__gcd(g,a[i]);
  if(g!=1)ok2=false;
  set<int>se;
  rep(i,n){
    set<int>cnt;
    for(ll j=2; j*j<=a[i]; ++j){
      while(a[i]%j==0){
        a[i]/=j;
        cnt.insert(j);
      }
    }
    if(a[i]!=1)cnt.insert(a[i]);
    for(auto&p:cnt){
      if(se.find(p)!=se.end())ok1=false;
      se.insert(p);
    }
  }
  if(ok1){cout<<"pairwise coprime"<<endl; return 0;}
  if(ok2){cout<<"setwise coprime"<<endl; return 0;}
  cout<<"not coprime"<<endl;
}