#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
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;
  }
  vector<pair<ll, int>> factor(ll x) {
    vector<pair<ll, int>> res;
    for (int p : primes) {
      int y = 0;
      while (x % p == 0) x /= p, ++y;
      if (y != 0) res.emplace_back(p, y);
    }
    if (x != 1) res.emplace_back(x, 1);
    return res;
  }
};
int main() {
  Sieve s(1000000);
  int n;
  cin >> n;
  map<int, int> m;
  int a;
  for (int i = 0; i < (n); ++i) {
    cin >> a;
    auto fs = s.factor(a);
    for (auto p : fs) {
      m[p.first]++;
    }
  }
  int maxv = 0;
  for (auto itr = m.begin(); itr != m.end(); itr++) {
    maxv = max(maxv, (*itr).second);
  }
  if (maxv == 1)
    cout << "pairwise coprime";
  else {
    if (maxv == n)
      cout << "not coprime";
    else
      cout << "setwise coprime";
  }
  cout << endl;
  return 0;
}
