#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
template <class T>
bool chmin(T& a, const T& b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
const long double EPS = 1e-10;
const long long INF = 1e18;
const int MOD = (int)1e9 + 7;
const long double PI = acos(-1.0L);
vector<long long> prime;
vector<long long> eratosthenes(long long n) {
  vector<long long> is_prime(n + 1, true);
  for (long long i = 2; i * i <= n; i++) {
    if (is_prime[i]) {
      for (long long j = i + i; j <= n + 1; j += i) {
        is_prime[j] = false;
      }
    }
  }
  for (long long i = 2; i < is_prime.size(); i++) {
    if (is_prime[i]) {
      prime.push_back(i);
    }
  }
  return prime;
}
int main() {
  int N;
  cin >> N;
  vector<long long> A(1000005, 0);
  vector<int> V(N);
  long long gmax = -1;
  for (long long i = 0; i < N; ++i) {
    long long a;
    cin >> a;
    gmax = max(gmax, a);
    A[a]++;
    V[i] = a;
  }
  bool is_pc = true;
  for (auto p : eratosthenes(gmax)) {
    long long tmp = 0;
    for (long long i = p; i < gmax; i += p) {
      tmp += A[i];
    }
    if (tmp > 1) {
      is_pc = false;
      break;
    }
  }
  if (is_pc == true) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = 0;
  for (long long i = 0; i < N; i++) {
    g = gcd(g, V[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
