#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(int n) {
  if (n == 2) return true;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
void prime_fact(int x, set<int> &f) {
  if (x < 2) return;
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      f.insert(i);
      while (x % i == 0) x /= i;
    }
  }
  if (x != 1) f.insert(x);
}
int n;
int a[MAX];
set<int> s;
bool flag = true;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    if (flag) {
      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()));
      set<int> u;
      if (s_and_f.empty()) {
        set_union(s.begin(), s.end(), f.begin(), f.end(), inserter(u, u.end()));
        s = u;
      } else
        flag = false;
    }
    if (i > 0) a[i] = gcd(a[i], a[i - 1]);
  }
  if (flag)
    cout << "pairwise coprime"
         << "\n";
  else {
    if (a[n - 1] == 1)
      cout << "setwise coprime"
           << "\n";
    else
      cout << "not coprime"
           << "\n";
  }
}
