#include <bits/stdc++.h>
using namespace std;
inline bool valid(int x, int n) { return 0 <= x && x < n; }
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
template <typename T>
inline T pop(queue<T>& q) {
  T front = q.front();
  q.pop();
  return front;
}
template <typename T>
inline T gcd(T a, T b) {
  for (; b; a %= b, swap(a, b))
    ;
  return a;
}
template <typename T>
tuple<T, T, T> xgcd(T a, T b) {
  if (b == 0) return {1, 0, a};
  T x, y, g;
  tie(x, y, g) = xgcd(b, a % b);
  return {y, x - (a / b) * y, g};
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  vector<int> prime;
  for (int i = 2; i <= 1000; i++) {
    bool ok = 1;
    for (int p : prime) {
      if (i % p == 0) {
        ok = 0;
        break;
      }
      if (p * p > i) break;
    }
    if (ok) prime.push_back(i);
  }
  vector<bool> chk(1001);
  bool pa = 1;
  for (int i = 0; i < N; i++) {
    int tmp = A[i];
    for (int p : prime) {
      if (tmp % p == 0 && chk[p]) pa = 0;
      while (tmp % p == 0) {
        chk[p] = 1;
        tmp /= p;
      }
    }
  }
  int g = A[0];
  for (int i = 1; i < N; i++) g = gcd(g, A[i]);
  bool sa = (g == 1);
  if (pa)
    cout << "pairwise coprime";
  else if (sa)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
