#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main(int argc, char *argv[]) {
  long long N, i;
  cin >> N;
  vector<long long> A(N);
  for (i = (0); i < (N); ++i) {
    cin >> A[i];
  }
  long long g = A[0];
  for (i = (1); i < (N); ++i) {
    g = gcd(g, A[i]);
  }
  if (g != 1) {
    cout << "not coprime" << endl;
  } else {
    unordered_set<long long> factors;
    bool pairwise = true;
    auto test = [&](long long &A, long long p) {
      if (A % p == 0) {
        while (A % p == 0) {
          A /= p;
        }
        if (factors.find(p) != factors.end()) {
          pairwise = false;
        } else {
          factors.insert(p);
        }
        return true;
      }
      return false;
    };
    for (i = (0); i < (N); ++i) {
      long long a = A[i];
      test(a, 2);
      long long p = 3;
      while (p * p <= a) {
        test(a, p);
        p += 2;
      }
    }
    if (pairwise) {
      cout << "pairwise coprime" << endl;
    } else {
      cout << "setwise coprime" << endl;
    }
  }
  return 0;
}
