#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
vector<int> Eratosthenes(const int N) {
  vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  vector<int> P;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < (int)(N); i++) cin >> A[i];
  map<int, int> F;
  int P[168];
  int count = 0;
  for (const auto& p : Eratosthenes(1000)) {
    P[count] = p;
    count++;
  }
  for (int i = 0; i < (int)(N); i++) {
    for (int j = 0; j < (int)(168); j++) {
      if (A[i] < P[j]) break;
      if (A[i] % P[j] != 0) continue;
      while (A[i] % P[j] == 0) A[i] /= P[j];
      F[P[j]]++;
    }
    if (A[i] != 1) F[A[i]]++;
  }
  int res = 0;
  for (const auto& [key, value] : F) {
    res = max(res, value);
  }
  if (res == 1)
    cout << "pairwise coprime" << endl;
  else if (res == N)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
}
