#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long double EPS = 1e-8;
class Sieve {
  long long n_;
  vector<long long> sieve_, primes_;

 public:
  explicit Sieve(long long n = 1) : n_(n), sieve_(n + 1) {
    sieve_[0] = sieve_[1] = -1;
    for (long long i = 2; i <= n; ++i) {
      if (sieve_[i]) continue;
      primes_.push_back(i);
      sieve_[i] = i;
      for (long long j = i * i; j <= n; j += i) {
        if (!sieve_[j]) sieve_[j] = i;
      }
    }
  }
  bool isPrime(long long x) {
    assert(n_ * n_ >= x);
    if (n_ >= x) {
      return sieve_[x] == x;
    } else {
      for (const auto prime : primes_) {
        if (x % prime == 0) return false;
      }
      return true;
    }
  }
  vector<long long> getPrimes() { return primes_; }
  vector<pair<long long, int>> getPrimeFactorList(long long x) {
    assert(n_ * n_ >= x);
    vector<long long> factorList;
    for (int i = (int)primes_.size() - 1; i >= 0; i--) {
      if (n_ >= x) break;
      while (x % primes_[i] == 0) {
        x /= primes_[i];
        factorList.emplace_back(primes_[i]);
      }
    }
    if (isPrime(x)) {
      factorList.emplace_back(x);
      x /= x;
    }
    assert(n_ >= x);
    while (x != 1) {
      factorList.push_back(sieve_[x]);
      x /= sieve_[x];
    }
    if (factorList.empty()) return {};
    vector<pair<long long, int>> res(1, pair<long long, int>(factorList[0], 0));
    for (long long p : factorList) {
      if (res.back().first == p) {
        res.back().second++;
      } else {
        res.emplace_back(p, 1);
      }
    }
    return res;
  }
};
void solve(long long N, std::vector<long long> A) {
  Sieve sieve(1e6 + 1);
  unordered_set<int> pairwise, setwise;
  for (const auto& p : sieve.getPrimeFactorList(A[0])) {
    pairwise.insert(p.first);
    setwise.insert(p.first);
  }
  bool isPairwise = true;
  for (long long i = (1); i < (N); i++) {
    unordered_set<int> newSetwise;
    for (const auto& p : sieve.getPrimeFactorList(A[i])) {
      if (!pairwise.empty() && pairwise.find(p.first) != pairwise.end()) {
        isPairwise = false;
      }
      if (!setwise.empty() && setwise.find(p.first) != setwise.end()) {
        newSetwise.insert(p.first);
      }
    }
    setwise = newSetwise;
  }
  if (isPairwise) {
    cout << "pairwise coprime" << endl;
  } else if (setwise.empty()) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
signed main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  solve(N, std::move(A));
  return 0;
}
