#include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
using ll = long long;
using P = pair<int, int>;
const int mod = 1000000007;
struct Sieve {
  int n;
  vector<int> f, primes;
  Sieve(int n = 1) : n(n), f(n + 1) {
    f[0] = f[1] = -1;
    for (ll i = 2; i <= n; ++i) {
      if (f[i]) continue;
      primes.push_back(i);
      f[i] = i;
      for (ll j = i * i; j <= n; j += i) {
        if (!f[j]) f[j] = i;
      }
    }
  }
  bool isPrime(int x) { return f[x] == x; }
  vector<int> factorList(int x) {
    vector<int> res;
    while (x != 1) {
      res.push_back(f[x]);
      x /= f[x];
    }
    return res;
  }
  vector<P> factor(int x) {
    vector<int> fl = factorList(x);
    if (fl.size() == 0) return {};
    vector<P> res(1, P(fl[0], 0));
    for (int p : fl) {
      if (res.back().first == p) {
        res.back().second++;
      } else {
        res.emplace_back(p, 1);
      }
    }
    return res;
  }
};
int main() {
  Sieve sieve(1e6);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  map<int, int> gcdfactor;
  auto f0 = sieve.factor(a[0]);
  for (auto p : f0) {
    gcdfactor[p.first] = p.second;
  }
  bool pairwise = true;
  for (int i = 1; i <= n - 1; i++) {
    auto f = sieve.factor(a[i]);
    map<int, int> mp;
    for (auto p : f) {
      mp[p.first] = p.second;
    }
    for (auto p : gcdfactor) {
      if (min(mp[p.first], p.second) >= 1) {
        pairwise = false;
      }
      gcdfactor[p.first] = min(mp[p.first], p.second);
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else {
    bool setwise = true;
    for (auto p : gcdfactor) {
      if (p.second >= 1) {
        setwise = false;
        cout << "not coprime" << endl;
        return 0;
      }
    }
    cout << "setwise coprime" << endl;
  }
  return 0;
}
