#include <bits/stdc++.h>

using namespace std;

int euclid(int a, int b){
  if(a < b){
    int tmp = a;
    a = b;
    b = tmp;
  }

  if(a % b == 0) return b;
  return euclid(b, a % b);
}

int main(){
  int N;
  bool pairwise  = true;
  cin >> N;
  vector<int> A(N);
  vector<int> count(1000000);
  int N_gcd = 1;
  for(int i = 0; i < N; i++){
    cin >> A.at(i);
    count(A.at(i))++;

    if(i == 0) N_gcd = A.at(0);
    else N_gcd = euclid(N_gcd, A.at(i));
  }

  for(i = 0; i < 1000000; i++){
    int total = 0;
    for(j = i; j < 1000000; j += i){
      total+= count.at(j);
    }
    if(total > 1){
      pairwise = false;
      break;
    }
  }

  if(pairwise) cout << "pairwise coprime" << endl;
  else if(N_gcd == 1) cout << "setwise coprime" << endl;
  else cout << "not coprime" << endl;
  
  return 0;
}