#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const int iINF = 1001001001;
const long long llINF = 1LL << 60;
const ll mod = 1000000007;
struct UnionFind {
  vector<int> par;
  UnionFind(int N) : par(N) {
    for (int i = 0; i < N; ++i) par[i] = i;
  }
  int root(int x) {
    if (par[x] == x) return x;
    return par[x] = root(par[x]);
  }
  void unite(int x, int y) {
    int rx = root(x);
    int ry = root(y);
    if (rx == ry) return;
    par[rx] = ry;
  }
  bool same(int x, int y) {
    int rx = root(x);
    int ry = root(y);
    return rx == ry;
  }
};
vector<int> cnt;
bool divisor(ll n) {
  bool ok = true;
  for (ll i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      cnt[i]++;
      if (i * i != n) cnt[n / i]++;
      if (i != 1 && 1 < cnt[i]) ok = false;
      if (1 < cnt[n / i]) ok = false;
    }
  }
  return ok;
}
ll getGCD(ll a, ll b) {
  if (b == 0) return a;
  return getGCD(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  bool pc = true;
  cnt.assign(1000005, 0);
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    if (pc) pc = divisor(a[i]);
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  ll gcd = a[0];
  for (int i = 1; i < n; ++i) {
    gcd = getGCD(gcd, a[i]);
  }
  if (gcd == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
