#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
constexpr int MOD = 1000000007;
template <typename T>
void print(const vector<T> &v, bool add_one = false, int start = -1,
           int end = -1) {
  if (start < 0) start = 0;
  if (end < 0) end = int(v.size());
  for (int i = start; i < end; i++)
    cout << v[i] + (add_one ? 1 : 0) << (i < end - 1 ? ' ' : '\n');
}
vector<bool> isPrime;
map<int, vector<int>> mp;
set<int> elem;
void sieve(int N) {
  isPrime.assign(N + 1, true);
  for (int i = 2; i * i <= N; i++) {
    if (isPrime[i]) {
      if (elem.find(i) != elem.end()) {
        mp[i].push_back(i);
      }
      for (int j = i * i; j <= N; j += i) {
        if (elem.find(j) != elem.end()) {
          mp[i].push_back(j);
        }
        isPrime[j] = false;
      }
    }
  }
}
template <class T>
T gcd(T a, T b) {
  return (b == 0) ? a : gcd(b, a % b);
}
void solve() {
  int N;
  cin >> N;
  int mx = 0;
  vector<int> first(N);
  for (int i = 0; i < N; i++) {
    cin >> first[i], mx = max(mx, first[i]);
    elem.insert(first[i]);
  }
  int gc = first[0];
  for (int i = 1; i < N; i++) {
    gc = gcd(gc, first[i]);
  }
  if (gc > 1) {
    cout << "not coprime";
    return;
  }
  sieve(mx);
  for (auto x : mp) {
    if (x.second.size() >= 2) {
      cout << "setwise coprime";
      return;
    }
  }
  cout << "pairwise coprime";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int T;
  T = 1;
  while (T--) {
    solve();
  }
}
