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

int main() {
  
  int N;
  cin >> N ;
  
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  
  int n = A.at(0);
  
  for (int i = 1; i < N; i++) {
    n = gcd(c,A.at(i));
  }
  if (n > 1) {
    cout << "not coprime" << endl;
    goto end;
  }
  
  for (int i = 0; i < N; i++) {
    for (int j = i+1; j < N; j++) {
      if (gcd(A.at(i),A.at(j)) > 1) {
        cout << "setwise coprime" << endl;
        goto end;
      }
    }
  }
  
  cout << "pairwise coprime" << endl;
  
  end:
  return 0;
}