#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
class Prime {
 public:
  const int n;
  vector<bool> is_prime;
  vector<int> primes;
  Prime(int size) : n(size), is_prime(n + 1, true) {
    is_prime[0] = false;
    is_prime[1] = false;
    for (int i = 2; i <= n; ++i) {
      if (!is_prime[i]) continue;
      primes.push_back(i);
      int tmp = 2 * i;
      while (tmp <= n) {
        is_prime[tmp] = false;
        tmp += i;
      }
    }
  }
  bool check(int x) { return is_prime[x]; }
};
struct PrimeFactorization {
  const int n;
  Prime p;
  PrimeFactorization(int n) : n(n), p(n) {}
  map<ll, int> calc(ll a) {
    map<ll, int> ret;
    ll tmp = a;
    for (int i : p.primes) {
      if (i > tmp) break;
      int count = 0;
      while (tmp % i == 0) {
        ++count;
        tmp /= i;
      }
      if (count > 0) ret[i] = count;
    }
    if (tmp > 1) ret[tmp] = 1;
    return ret;
  }
};
int main() {
  int n;
  cin >> n;
  set<ll> nums;
  bool pairwise = true;
  PrimeFactorization pf(1000000);
  ll g = -1;
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    if (g == -1) g = a;
    auto fact = pf.calc(a);
    for (auto it : fact) {
      ll d = it.first;
      if (nums.find(d) != nums.end()) {
        pairwise = false;
      }
      nums.insert(d);
    }
    g = gcd(g, a);
  }
  bool setwise = (g == 1);
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (setwise) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
