#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
using ll = long long;
using P = pair<int, int>;
constexpr ll INF = 1e18;
constexpr int inf = 1e9;
constexpr ll mod = 1000000007;
constexpr ll mod2 = 998244353;
const int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
const int dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  vector<int> cnt(1100100, 0);
  bool can = true;
  for (int i = 0; i < N; i++) {
    for (int j = 2; j * j <= A[i]; j++) {
      if (A[i] % j == 0) {
        cnt[j]++;
        if (cnt[j] >= 2) {
          can = false;
          break;
        }
        if (A[i] / j != j) {
          cnt[A[i] / j]++;
          if (cnt[A[i] / j] >= 2) {
            can = false;
            break;
          }
        }
      }
    }
    if (!can) break;
  }
  if (can) {
    cout << "pairwise coprime"
         << "\n";
    return 0;
  }
  int now = A[0];
  for (int i = 1; i < N; i++) {
    now = gcd(now, A[i]);
  }
  if (now == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
  return 0;
}
