#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define All(a) (a).begin(),(a).end()

//a<bでないといけない
ll gcd(ll a,ll b){
  b%=a;
  if(b==0)return a;
  else gcd(b,a);
}

ll prime(ll a){
  if(a==1)return 1;
  vector<ll> v;
  for(ll i=2 ; i<=(ll)sqrt(a);i++){
    v.push_back(i);
  }
  v.push_back(a);
  vector<ll>::iterator itr;
  ll d;
  for (auto i = v.begin();i!=v.end() && *i!=a;){
    d=v[0];
    auto z=v.size();
    auto itr=v.begin();
    for (auto j=0;j<z;j++){
      ll m=*itr;
      if((m%d)==0){
        v.erase(itr);
      }else{
        itr++;
      }
    }
  }
  return v.size();
}

vector<ll> prime_factorization(ll x){
  vector<ll> v;
  ll i;
  for (i=2; i<x; i++){
    if(x%i==0){
      v.push_back(i);
      while(x%i==0)x/=i;
    }
  }
  if(x!=1)v.push_back(x);
  return v;
}


void solve(){
  int n,m;
  vector<int> X;
  scanf("%d",&n);
  vector<int> A(n);
  for(int i=0;i<n;i++){
    scanf("%d",&A[i]);
  }
  sort(All(A));

  int tmp=A[0];
  for (int i = 1; i < n; i++)
  {
    tmp=gcd(tmp,A[i]);
  }
  if(tmp>1){ 
    printf("not coprime\n");
    return;
  }
  if(A.size()>80000){ 
    printf("setwise coprime\n");
    return;
  }
  for (int i = 0; i < n-1; i++)
  {
    for (int j = i+1; j <n; j++)
    {
      int a=__gcd(A[i],A[j]);
      if(a>1)goto setwise;
      //auto a=find(All(X),f[j]);
      //if(a!=X.end())goto setwise;
      //else{
      //X.push_back(f[j]);
      //}
    }
    
  }
  printf("pairwise coprime\n");
  return;

setwise:
  printf("setwise coprime\n");
  return;

}
int main(){
  
  // int q=3;
  // while(q--){
  //   solve();
  // }
 solve();


  return 0;
}