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

int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (auto &e : A) cin >> e;
  bool b = false;
  int g1 = gcd(A[0],A[1]);
  for (int i = 2; i < N; i++) {
    g1 = gcd(A[i],g1);
  }
  if (g1 != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<bool> pr(1000001,false);
  for (int i = 2; i <= 1000000; i++) {
    if (pr[i]) continue;
    for (int j = i; j <= 1000000; j += i) {
      pr[j] = true;
    }
    int c = 0;
    for (int j = 0; j < N; j++) {
      if (A[j]%i == 0) c += 1;
      if (c >= 2) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << endl;
}