#include <numeric>
#include <iomanip>
#include <iostream>
#include <map>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;

vector<bool> prime_table(int n) {
  vector<bool> prime(n + 1, true);
  if (n >= 0) prime[0] = false;
  if (n >= 1) prime[1] = false;
  for (int i = 2; i * i <= n; i++) {
    if (!prime[i]) continue;
    for (int j = i + i; j <= n; j += i) {
      prime[j] = false;
    }
  }
  return prime;
}

int main(void) {
  ios::sync_with_stdio(false);
  vector<bool> ptbl = prime_table(1e6 + 1);
  int N;
  cin >> N;
  int not_prime = 0;
  vector<int64_t> A(N);
  rep(i, N) {
    cin >> A[i];
    if(!ptbl[A[i]]) not_prime++;
  }
  if(not_prime <= 1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }

  int64_t Agcd = A[0];
  for(int i = 1; i < N; ++i) {
    Agcd = gcd(Agcd, A[i]);
  }
  if(Agcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
