#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 = gcd(A.at(0),A.at(1));
  
  for (int i = 2; i <= n; i++) {
    bool nc = true;
    for (int j = 0; j < N; j++) {
      if (A.at(j)%i != 0) {
        nc = false;
      }
    }
    if (nc) {
      cout << "not coprime" << endl;
      goto end;
    }
  }
  
  if (n == 1) {
    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;
    goto end;
  }
  
  cout << "setwise coprime" << endl;
  
  end:
  return 0;
}