#include <bits/stdc++.h>
using namespace std;
int const INF = 1001001001;
long long const LINF = 1001001001001001001;
long long const MOD = 1000000007;
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
long long N;
long long A[1000000];
int main() {
  cin >> N;
  for (int i = 0; i < N; i++) cin >> A[i];
  long long l = 1;
  long long cntl = 0;
  for (int i = 0; i < N; i++) {
    l = lcm(l, A[i]);
    cntl += l / MOD;
    l %= MOD;
  }
  long long m = 1;
  long long cntm = 0;
  for (int i = 0; i < N; i++) {
    m *= A[i];
    cntm += m / MOD;
    m %= MOD;
  }
  if (l == m && cntl == cntm) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long g = 0;
  for (int i = 0; i < N; i++) {
    g = gcd(g, A[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
