#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
const ll INF = 1e18;
const int mod = 1e9 + 7;
const int MAX = 1e6;
struct edge {
  int to, cost;
};
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool is_prime[MAX + 1];
set<int> prime_set;
void erat() {
  memset(is_prime, true, sizeof(is_prime));
  for (int i = 2; i <= MAX; i++) {
    if (is_prime[i] == true) {
      prime_set.insert(i);
      for (int j = i + i; j <= MAX; j += i) {
        is_prime[j] = false;
      }
    }
  }
}
void prime_fact(int x, set<int> &f) {
  for (int p : prime_set) {
    if (p > x) break;
    if (x % p == 0) {
      f.insert(p);
      while (x % p == 0) {
        x /= p;
      }
    }
  }
  if (x != 1) {
    f.insert(x);
  }
}
int n;
int a[MAX];
set<int> s;
bool flag = true;
int main() {
  erat();
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    set<int> f;
    prime_fact(a[i], f);
    set<int> s_and_f;
    set_intersection(s.begin(), s.end(), f.begin(), f.end(),
                     inserter(s_and_f, s_and_f.end()));
    if (s_and_f.empty()) {
      for (int x : f) s.insert(x);
    } else
      flag = false;
    if (i > 0) a[i] = gcd(a[i], a[i - 1]);
  }
  if (flag)
    cout << "pairwise comprime"
         << "\n";
  else {
    if (a[n - 1] == 1)
      cout << "setwise comprime"
           << "\n";
    else
      cout << "not comprime"
           << "\n";
  }
}
