#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;
inline vector<int> Eratosthenes(const int N) {
  vector<int> prime_num;
  vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; ++i) {
    is_prime[i] = true;
  }
  for (int i = 2; i <= N; ++i) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      prime_num.emplace_back(i);
    }
  }
  return prime_num;
}
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> P = Eratosthenes(max_num / 2 + 1);
  bool is_pairwise = true;
  for (const auto prime : P) {
    int cnt = 0;
    for (ll i = 0, xxx_rep_end = (N); i < xxx_rep_end; ++i) {
      if (A[i] % prime == 0) {
        ++cnt;
      }
    }
    if (cnt == N) {
      cout << "not coprime" << endl;
      return 0;
    } else if (cnt > 1) {
      is_pairwise = false;
    }
  }
  if (is_pairwise) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
}
