#include <bits/stdc++.h>
using namespace std;
int64_t gcd(int64_t a, int64_t b) {
  if (a % b == 0) return (b);
  return (gcd(b, a % b));
}
int main(void) {
  int64_t N;
  cin >> N;
  vector<int64_t> A(N);
  int64_t maxA = 0;
  for (int64_t i = 0; i < N; ++i) {
    cin >> A[i];
    if (A[i] > maxA) maxA = A[i];
  }
  vector<int64_t> D(maxA + 1);
  vector<int64_t> primes;
  for (int64_t i = 2; i <= maxA; ++i) {
    int64_t can_div = i;
    for (auto p : primes) {
      if (p * p > i) {
        break;
      }
      if (i % p == 0) {
        can_div = p;
        break;
      }
    }
    if (can_div == i) {
      primes.push_back(i);
    }
    D[i] = can_div;
  }
  vector<int64_t> seen(maxA + 1, -1);
  bool will_continue = true;
  for (auto a : A) {
    const int64_t origA = a;
    if (will_continue == false) break;
    while (a != 1) {
      int64_t p = D[a];
      if ((seen[p] != -1) && (seen[p] != origA)) {
        int64_t gcd_ret = A[0];
        for (int64_t i = 1; i < N; ++i) {
          gcd_ret = gcd(gcd_ret, A[i]);
        }
        if (gcd_ret == 1) {
          cout << "setwise coprime" << endl;
        } else {
          cout << "not coprime" << endl;
        }
        exit(0);
      }
      seen[p] = origA;
      a /= p;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
