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