#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const long long MAX_A = 1001000;
long long gcd(long long n, long long m) {
  if (n > m) {
    long long l = n;
    n = m;
    m = l;
  }
  if (n == 0) {
    return m;
  }
  while (1) {
    long long l = n;
    n = m % n;
    m = l;
    if (n == 0) {
      break;
    }
  }
  return m;
}
bool isprime(long long n) {
  if (n == 1) {
    return false;
  }
  if (n == 2) {
    return true;
  }
  long long sq = (long long)sqrt(double(n));
  for (long long i = 2; i <= sq; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long i, j, k, l;
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (auto &e : A) cin >> e;
  long long g = A[0];
  for (i = 1; i < N; i++) {
    g = gcd(g, A[i]);
  }
  if (g > 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<long long> D(MAX_A, 0);
  for (i = 2; i < D.size(); i++) {
    if (D[i] == 0) {
      long long p = i;
      while (p < D.size()) {
        D[p] = i;
        p += i;
      }
    }
  }
  set<long long> pset;
  for (i = 0; i < N; i++) {
    long long a = A[i];
    if (a == 1) continue;
    set<long long> pset_sub;
    while (D[a] != a) {
      pset_sub.insert(D[a]);
      a = a / D[a];
    }
    pset_sub.insert(a);
    set<long long> common;
    set_intersection(pset.begin(), pset.end(), pset_sub.begin(), pset_sub.end(),
                     inserter(common, common.end()));
    if (common.size() > 0) {
      cout << "setwise coprime" << endl;
      return 0;
    }
    set<long long> pset_new;
    set_union(pset.begin(), pset.end(), pset_sub.begin(), pset_sub.end(),
              inserter(pset_new, pset_new.end()));
    pset = pset_new;
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
