#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void count_num(ll n, unordered_map<ll, ll> &count,
               unordered_map<ll, ll> &over_count) {
  if (over_count.count(n))
    over_count[n]++;
  else {
    count[n]++;
    if (count[n] > 1) over_count[n] = count[n];
  }
}
int main() {
  ll N;
  cin >> N;
  vector<ll> A(N);
  unordered_map<ll, ll> count;
  unordered_map<ll, ll> over_count;
  for (int i = 0; i < (int)(N); i++) {
    ll A;
    cin >> A;
    if (A != 1) count_num(A, count, over_count);
    for (ll i = 2; i * i <= A; ++i) {
      if (A % i == 0) {
        count_num(i, count, over_count);
        if (i * i != A) {
          ll tmpA = A / i;
          count_num(tmpA, count, over_count);
        }
      }
    }
  }
  if (over_count.size() == 0) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  bool is_pairwise = true;
  for (auto itr = over_count.begin(), itr_end = over_count.end();
       itr != itr_end; ++itr) {
    if (itr->second == N) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "setwise coprime" << endl;
  return 0;
}
