#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1000000007
using namespace std;

int main(){
  long n;
  cin >> n;
  vector<long> a(n);
  long flag[1000001];
  int pairflag = 1;
  rep(i,1000001)flag[i] = 0;
  rep(i,n){
    cin >> a[i];
    if(flag[a[i]]!=0)pairflag = 0;
    flag[a[i]] = 1;
  }
  if(pairflag==0){
    long tmp = a[0];
    rep(i,n-1){
      tmp = __gcd(a[i+1],tmp);
    }
    if(tmp == 1)cout << "setwise coprime\n";
    else cout << "not coprime\n";
    return 0;
  }
  //sort(a.begin(), a.end());
  long gen = a[0];
  vector<long> yaku;
  long ii = 2;
  while(gen>1 && ii<=a[0]/2){
    if(gen%ii == 0){
      yaku.push_back(ii);
    }else{
      ii++;
      continue;
    }
    while(gen%ii==0)gen /= ii;
    ii++;
  }
  int setflag = 0;
  rep(i,n-1){
    rep(j,int(yaku.size())){
      if(a[i+1]%yaku[j]==0){
        setflag = 1;
        i = n;
        break;
      }
    }
  }
  if(setflag){
    long tmp = a[0];
    rep(i,n-1){
      tmp = __gcd(a[i+1],tmp);
    }
    if(tmp == 1)cout << "setwise coprime\n";
    else cout << "not coprime\n";
    return 0;
  }
  cout << "pairwise coprime\n";
  return 0;
}