#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const int INF = 1001001001;
map<ll, ll> mp;
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;
  }
  void factorMap(int x) {
    while (x != 1) {
      mp[f[x]]++;
      int temp = f[x];
      while (x % temp == 0) x /= temp;
    }
  }
  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() {
  ll n;
  cin >> n;
  Sieve s(1000005);
  for (ll i = 0; i < (n); ++i) {
    ll a1;
    cin >> a1;
    s.factorMap(a1);
  }
  ll Mi = INF;
  ll Ma = 0;
  for (auto i : mp) {
    Mi = min(i.second, Mi);
    Ma = max(i.second, Ma);
  }
  if (Ma == 1)
    cout << "pairwise coprime";
  else if (Ma == n)
    cout << "not coprime";
  else
    cout << "setwise coprime";
}
