#include <bits/stdc++.h>
using namespace std;
vector<bool> isPrime;
vector<int> primes;
void SieveOfEratosthenes(int n) {
  isPrime = vector<bool>(n, true);
  isPrime[0] = false;
  isPrime[1] = false;
  for (int i = 2; i < n; i++) {
    if (isPrime[i]) {
      for (int j = i * 2; j < n; j += i) {
        isPrime[j] = false;
      }
      primes.push_back(i);
    }
  }
}
vector<int> Factorize(int N) {
  vector<int> factors;
  for (int p : primes) {
    if (p > N) break;
    if (N % p == 0) {
      factors.push_back(p);
      N /= p;
    }
    while (N % p == 0) {
      N /= p;
    }
  }
  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];
  SieveOfEratosthenes(1000010);
  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;
}
