#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = (int)(0); i < (int)(N); i++) {
    cin >> A[i];
  }
  vector<bool> erats(1000001, true);
  vector<long> primes;
  for (int i = (int)(2); i < (int)(1000001); i++) {
    if (erats[i]) {
      primes.push_back(i);
      long j = i * 2;
      while (j <= 1000000) {
        erats[j] = false;
        j += i;
      }
    }
  }
  bool pairwise = true, setwise = true;
  vector<int> pair_p(1000000, 0);
  vector<int> set_p;
  for (int i = (int)(0); i < (int)(N); i++) {
    if (i != 0 && setwise) {
      vector<int> new_set_p;
      for (int p : set_p) {
        if (A[i] % p == 0) {
          new_set_p.push_back(p);
        }
      }
      if (new_set_p.empty()) setwise = false;
      set_p = new_set_p;
    }
    for (int p : primes) {
      if (A[i] % p == 0) {
        if (pair_p[p] == 1)
          pairwise = false;
        else
          pair_p[p] = 1;
        if (i == 0) {
          set_p.push_back(p);
        }
        while (A[i] % p == 0) A[i] /= p;
      }
      if (A[i] == 1) break;
    }
  }
  string ans;
  if (pairwise)
    ans = "pairwise coprime";
  else if (!setwise)
    ans = "setwise coprime";
  else
    ans = "not coprime";
  cout << ans << endl;
}
