#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vpii = vector<pii>;
template <typename X>
bool max_u(X& m, X v) {
  if (m < v) {
    m = v;
    return true;
  }
  return false;
}
template <typename X>
bool min_u(X& m, X v) {
  if (m > v) {
    m = v;
    return true;
  }
  return false;
}
bool is_prime(ll v) {
  if (v < 2) return false;
  if (v % 2 == 0) {
    return (v == 2);
  }
  for (ll i = 3; i * i <= v; i += 2) {
    if (v % i == 0) return false;
  }
  return true;
}
using pf = vector<pair<ll, int> >;
pf prime_factorization(ll v) {
  pf p;
  for (ll i = 2; i * i <= v; i++) {
    if (v % i == 0) {
      p.push_back(make_pair(i, 1));
      for (v /= i; v % i == 0; v /= i) {
        p.back().second++;
      }
    }
  }
  if (v > 1) p.push_back(make_pair(v, 1));
  return p;
}
int calc_divisor(vll& ret, ll v) {
  auto p = prime_factorization(v);
  ret.clear();
  ret.push_back(1);
  for (auto& mp : p) {
    int n = ret.size();
    for (int i = 0; i < n; i++) {
      ll t = ret[i];
      for (int j = mp.second; j > 0; j--) {
        ret.push_back(t *= mp.first);
      }
    }
  }
  sort(ret.begin(), ret.end());
  return ret.size();
}
struct solve {
  solve() {}
  ll operator()() { return 0; }
};
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  for (;;) {
    int n;
    cin >> n;
    if (cin.fail()) break;
    vi a(n);
    for (auto& m : a) cin >> m;
    map<ll, int> m;
    for (int i = 0; i < n; i++) {
      auto p = prime_factorization(a[i]);
      for (auto& mp : p) {
        m[mp.first]++;
      }
    }
    int count = 0;
    for (auto& mm : m) {
      max_u(count, mm.second);
    }
    string msg;
    if (count == 1) {
      msg = "pairwise coprime";
    } else if (count == n) {
      msg = "not coprime";
    } else {
      msg = "setwise coprime";
    }
    cout << msg << "\n";
  }
  return 0;
}
