#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;
  for (int i = 0; i < (int)(N); i++) {
    ll A;
    cin >> A;
    count[A]++;
    ll rtA = sqrt(A);
    for (ll i = 2; i <= rtA; i += 1) {
      if (A % i == 0) {
        count[i]++;
        if (A / i != i) count[A / i]++;
      }
    }
  }
  bool is_pairwise = true;
  for (auto itr = count.begin(); itr != count.end(); ++itr) {
    if (itr->second == N) {
      cout << "not coprime" << endl;
      return 0;
    } else if (itr->second > 1) {
      is_pairwise = false;
    }
  }
  if (is_pairwise)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
