#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, ll a) {
  for (ll i = 2; i < ll(sqrt(a) + 1); i++) {
    while (a % i == 0) {
      a /= i;
      fac[i]++;
    }
  }
  if (a > 1) fac[a]++;
}
bool isp(int n) {
  for (int a = 2; a < (int)(sqrt(n) + 1); a++) {
    if (n % a == 0 && a < n) return false;
  }
  return true;
}
vector<int> primes(int n) {
  vector<int> res;
  for (int i = 2; i <= n; i++) {
    if (isp(i)) res.push_back(i);
  }
  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;
  vector<bool> B(M, false);
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    A.push_back(a);
    B[a] = true;
  }
  sort(A.begin(), A.end());
  bool isPair = true;
  vector<int> p = primes(1000000);
  for (int i = 0; i < p.size(); i++) {
    int pr = p[i];
    int num = 0;
    for (int j = 1; j * pr < M; j++) {
      if (B[pr * j]) num++;
      if (num >= 2) {
        isPair = false;
        break;
      }
    }
    if (!isPair) break;
  }
  int 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;
}
