#include <bits/stdc++.h>
using namespace std;
vector<int> sieve(int n) {
  vector<bool> is_prime(n, true);
  is_prime[0] = false;
  is_prime[1] = false;
  vector<int> primes;
  for (int i = 2; i * i <= n; ++i) {
    if (is_prime[i]) {
      primes.push_back(i);
      for (int j = i * i; j <= n; j += i) is_prime[j] = false;
    }
  }
  return primes;
}
set<int> primeFactorize(int n, vector<int> &primes) {
  set<int> res;
  int m = primes.size();
  for (int i = 0; i < m; ++i) {
    if (primes[i] > n) break;
    while (n % primes[i] == 0) {
      n /= primes[i];
      res.insert(primes[i]);
    }
  }
  return res;
}
bool check(vector<set<int> > x) {
  set<int> st = x[0];
  for (int i = 1; i < x.size(); ++i) {
    set<int> e = x[i];
    int n = st.size();
    int m = e.size();
    st.insert(e.begin(), e.end());
    if ((int)st.size() < n + m) return false;
  }
  return true;
}
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  vector<int> primes = sieve(1e6 + 1);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  vector<set<int> > a_primes(n);
  for (int i = 0; i < n; ++i) {
    a_primes[i] = primeFactorize(a[i], primes);
  }
  if (check(a_primes)) {
    puts("pairwise coprime");
    return 0;
  }
  int g = a[0];
  for (int i = 1; i < n; ++i) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    puts("setwise coprime");
  } else {
    puts("not coprime");
  }
  return 0;
}
