#include <bits/stdc++.h>
using namespace std;
vector<bool> isPrime;
vector<int> primes;
vector<int> Factorize(int N) {
  vector<int> factors;
  if (N % 2 == 0) {
    factors.push_back(2);
    while (N % 2 == 0) N /= 2;
  }
  for (int i = 3; i * i <= N; i += 2) {
    if (N % i == 0) {
      factors.push_back(i);
      while (N % i == 0) N /= i;
    }
  }
  return factors;
}
template <typename T>
T gcd(T a, T b) {
  return (b ? gcd(b, a % b) : a);
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  vector<int> factors(1000010, 0);
  bool is_pairwise_coprime = true;
  for (int i = 0; i < N; i++) {
    vector<int> fs = Factorize(A[i]);
    for (int f : fs) {
      if (f == 1) continue;
      if (factors[f] > 0) {
        is_pairwise_coprime = false;
      }
      factors[f]++;
    }
  }
  if (is_pairwise_coprime) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  for (int i = 0; i < 1000010; i++) {
    if (factors[i] == N) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "setwise coprime" << endl;
  return 0;
}
