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

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

vector<int> X(1000001)={};
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]);
    X[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;
  }

  for (int i = 2; i <1000001; i++){
    int cnt=0;
    for (int j = i; j <n; j+=i)
    {
      cnt+=X[i];
      if(cnt>1){
        printf("setwise coprime\n")
        return;
      }
      //auto a=find(All(X),f[j]);
      //if(a!=X.end())goto setwise;
      //else{
      //X.push_back(f[j]);
      //}
    }
    
  }
  printf("pairwise coprime\n");
  return;
int main(){
  
  // int q=3;
  // while(q--){
  //   solve();
  // }
 solve();
  return 0;
}