#define ll long long int
#include <bits/stdc++.h>
using namespace std;

int main(){
  ll N,M = 0;

  cin >> N;
  vector<ll> A(N);
  for(auto& x:A){
    cin >> x;
    M = max(M,x);
  }
  
  vector<ll> m(M+1,0);
  vector<ll> d(M+1,1);
  vector<ll> c(M+1,0);
  vector<ll> t(M+1);
  
  int i,j;
  for(i=2;i*i<=M;i++){
    if (m[i]) continue;
    m[i] = i;
    for(j=i*2;j<=M;j+=i){
      if (m[j]) continue;
      m[j] = i;
      d[j] = j/i;
    }
  }
  bool pcf = true;
  ll w;
  for(i=0;i<N;i++){
    for(auto& x:t) x = 0;
    w = A[i];
    while(w>1){
      t[m[w]] = 1;
      w = d[w];
    }
    for(j=2;j<=M;j++){
      if (t[j]){
        c[j]++;
        if (c[j]>1){
          pcf = false;
          break;
        }
      }
    }
    if (!pcf)
      break;
  }

  w = gcd(A[0],A[1]);
  for(i=2;i<N;i++){
    if (w == 1)
      break;
    w = gcd(w,A[i]);
  }
  
  if (pcf)
    cout << "pairwise coprime" << endl;
  else{
    if (w == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }

  return 0;
}