#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lld = long long;
ll gcd(ll a, ll b) {
  if (a < b) {
    return gcd(b, a);
  }
  while (b != 0) {
    ll tmp = b;
    b = a % b;
    a = tmp;
  }
  return a;
}
map<ll, ll> MAP;
void prime_factor(ll n) {
  ll a = 2;
  set<ll> inserted;
  while (a * a <= n) {
    if (n % a == 0) {
      n /= a;
      if (inserted.find(a) == inserted.end()) {
        if (MAP.find(a) != MAP.end()) {
          MAP[a] += 1;
        } else {
          MAP[a] = 1;
        }
        inserted.insert(a);
      }
    } else {
      a++;
    }
  }
  if (inserted.find(n) == inserted.end()) {
    if (MAP.find(n) != MAP.end()) {
      MAP[n] = +1;
    } else {
      MAP[n] = 1;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0; i < N; ++i) {
    cin >> A[i];
    prime_factor(A[i]);
  }
  bool is_pair = true;
  bool is_set = true;
  for (auto& [key, value] : MAP) {
    if (value != 1) {
      is_pair = false;
    }
    if (value == A.size()) {
      is_set = false;
    }
  }
  if (is_pair && is_set) {
    cout << "pairwise coprime" << endl;
    ;
  } else if (is_set) {
    cout << "setwise coprime" << endl;
    ;
  } else {
    cout << "not coprime" << endl;
    ;
  }
}
