#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  return b ? gcd(b, a % b) : a;
}
unsigned long long lcm(unsigned long long a, unsigned long long b) {
  return a / gcd(a, b) * b;
}
void func(long long N, std::vector<long long> A) {
  ll l, g, p, tmp;
  bool flg = true;
  l = 1;
  g = A[0];
  p = 1;
  for (int i = 0, i_len = (N); i < i_len; i++) {
    tmp = lcm(l, A[i]);
    if (tmp != A[i] * l) flg = false;
    l = tmp;
    g = gcd(g, A[i]);
  }
  if (g > 1)
    cout << "not coprime" << endl;
  else if (flg)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
}
int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  func(N, std::move(A));
  return 0;
}
