#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T>
using vec2 = vector<vector<T>>;
template <typename T>
using vec3 = vec2<vector<T>>;
template <typename T>
using vec4 = vec3<vector<T>>;
template <typename T>
using vec5 = vec4<vector<T>>;
template <typename T>
using vec6 = vec5<vector<T>>;
void factorize(map<ll, ll>& fac, vector<ll>& primes, ll a) {
  for (int i = 0; primes[i] <= a; i++) {
    ll pr = primes[i];
    ll pow = pr;
    if (a % pr != 0) continue;
    fac[pr] = 0;
    while (pow < a) {
      fac[pr]++;
      pow *= pr;
    }
  }
}
vector<ll> primesuntil(ll n) {
  vector<ll> res;
  vector<bool> isprime(n + 1, true);
  for (int i = 2; i <= n; i++) {
    if (!isprime[i]) continue;
    res.push_back(i);
    for (int j = 2; j * i <= n; j++) {
      isprime[j * i] = false;
    }
  }
  return res;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  vector<ll> A;
  int M = 1000010;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    A.push_back(a);
  }
  vector<ll> primes = primesuntil(M);
  vector<int> nums(M, 0);
  bool isPair = true;
  map<ll, ll> mp;
  for (int i = 0; i < N; i++) {
    mp.clear();
    factorize(mp, primes, A[i]);
    for (const pair<ll, ll>& p : mp) {
      nums[p.first]++;
      if (nums[p.first] >= 2) {
        isPair = false;
        break;
      }
    }
    if (!isPair) break;
  }
  ll g = A[0];
  for (int i = 0; i < N; i++) {
    g = gcd(g, A[i]);
  }
  bool isSet = g == 1;
  if (isSet && !isPair)
    cout << "setwise coprime" << endl;
  else if (isPair)
    cout << "pairwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
