#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
using pll = pair<ll, ll>;
template <class T1, class T2>
inline void chmax(T1 &a, const T2 &b) {
  if (a < b) a = b;
}
template <class T1, class T2>
inline void chmin(T1 &a, const T2 &b) {
  if (a > b) a = b;
}
constexpr ll INF = 0x3f3f3f3f3f3f3f3fLL;
constexpr ll mod = 1000000007;
int main() {
  int N;
  cin >> N;
  int max_num = 0;
  vector<int> A(N);
  for (ll i = 0, xxx_rep_end = (N); i < xxx_rep_end; ++i) {
    cin >> A[i];
    chmax(max_num, A[i]);
  }
  vector<int> prime(max_num + 1, 0);
  for (int i = 2; i < max_num + 1; ++i) {
    if (prime[i] == 0) {
      for (int j = i; j <= max_num + 1; j += i) {
        if (prime[j] == 0) {
          prime[j] = i;
        }
      }
    }
  }
  vector<int> s(N + 1, 0);
  for (int i = 0; i < N; ++i) {
    int num = A[i];
    set<int> tmp;
    while (num != 1) {
      tmp.emplace(prime[num]);
      num /= prime[num];
    }
    for (auto x : tmp) {
      ++s[x];
    }
  }
  bool is_pairwise = true;
  for (auto x : s) {
    if (x == N) {
      cout << "not coprime" << endl;
      return 0;
    } else if (x > 1) {
      is_pairwise = false;
    }
  }
  if (is_pairwise) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
}
