#include <bits/stdc++.h>
using namespace std;
using ll = long long;
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[A]++;
    for (ll i = 2; i * i <= A; ++i) {
      if (A % i == 0) {
        if (over_count.count(i))
          over_count[i]++;
        else {
          count[i]++;
          if (count[i] > 1) over_count[i] = count[i];
        }
        if (i * i != A) {
          ll tmpA = A / i;
          if (over_count.count(tmpA))
            over_count[tmpA]++;
          else {
            count[tmpA]++;
            if (count[tmpA] > 1) over_count[tmpA] = count[tmpA];
          }
        }
      }
    }
  }
  if (over_count.size() == 0) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  bool is_pairwise = true;
  for (auto itr = over_count.begin(); itr != over_count.end(); ++itr) {
    if (itr->second == N) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "setwise coprime" << endl;
  return 0;
}
