#include <bits/stdc++.h>
using namespace std;
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; };
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; };
long long mod(long long a, long long b) { return (a + b - 1) / b; };
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T& val) {
  std::fill((T*)array, (T*)(array + N), val);
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
};
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
};
signed main() {
  cin.tie(nullptr);
  cout.tie(nullptr);
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  long long a[n];
  for (long long(i) = 0; i < (n); i++) cin >> a[i];
  long long table[1000010] = {};
  bool pairwise = 1, setwise = 1;
  long long curg = a[0];
  for (long long(i) = 0; i < (n); i++) {
    curg = gcd(curg, a[i]);
  }
  for (long long(i) = 0; i < (n); i++) {
    for (long long j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        if (table[j]) {
          pairwise = 0;
          continue;
        }
        table[j] = 1;
      }
    }
    if (table[a[i]]) {
      pairwise = 0;
      continue;
    }
    table[a[i]] = 1;
  }
  if (pairwise)
    cout << "pairwise coprime"
         << "\n";
  else if (curg == 1)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
  return 0;
}
