#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<long long>;
using vvl = vector<vector<long long>>;
using vc = vector<char>;
using vvc = vector<vector<char>>;
using vs = vector<string>;
using pll = pair<ll, ll>;
const ll INF = 1e9;
const ll MOD = 1e9 + 7;
ll llin() {
  ll x;
  cin >> x;
  return x;
}
string stin() {
  string s;
  cin >> s;
  return s;
}
vl vlin(ll n) {
  vl a(n);
  for (ll i = 0; i < (ll)n; i++) {
    cin >> a[i];
  }
  return a;
}
void Yes(bool ans) { cout << (ans ? "Yes" : "No") << endl; }
void YES(bool ans) { cout << (ans ? "YES" : "NO") << endl; }
ll gcd(ll a, ll b) {
  if (a < b) swap(a, b);
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
vl Eratosthenes(ll n) {
  vector<bool> is_prime(n + 1, true);
  vl P;
  for (ll i = (ll)2; i < (ll)n + 1; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= n; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
int main() {
  ll n;
  cin >> n;
  vl a(n);
  for (ll i = 0; i < (ll)n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  bool pc = true;
  bool sc = true;
  for (ll i : Eratosthenes(sqrt(a[n - 1]))) {
    ll dividecount = 0;
    for (ll j = 0; j < (ll)n; j++) {
      if (a[j] % i == 0) {
        dividecount++;
      }
    }
    if (dividecount >= 2) pc = false;
    if (dividecount == n) sc = false;
    if (!pc && !sc) break;
  }
  if (pc)
    cout << "pairwise coprime" << endl;
  else if (sc)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
