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

unordered_set<int> primer;

bool divisor(int n){
  for(int i = 2; i * i <= n; i++){
    if(n % i == 0){
      if(primer.count(i)) return false;
      else primer.insert(i);
    }
    while(n % i == 0){
      n /= i;
    }
  }
  if(n != 1){
    if(primer.count(n)) return false;
    else primer.insert(n);
  }
  return true;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << setprecision(20) << fixed;
  long long N;
  cin >> N;
  bool setwise = false, pairwise = false;
  vector<int> A(N);
  bool allone = true;

  for(int i = 0; i < N; i++){
    cin >> A[i];
    if(A[i] != 1){
      allone = false;
    }
  }
  //gcd of all
  int Gcd = A[0];
  for(int i = 1; i < N; i++){
    Gcd = __gcd(A[i], Gcd);
  }
  if(Gcd == 1){
    setwise = true;
  }

  if(N <= 80000){
    int i = 0;
    while(i < N && divisor(A[i])){
      i++;
    }
    if(i == N){
      pairwise = true;
    }
  }
  if(allone) cout << "pairwise coprime" <<endl; return 0;
  if(pairwise) cout << "pairwise coprime" <<endl;
  else if(setwise) cout << "setwise coprime" <<endl;
  else cout << "not coprime"<<endl;
}

