#include <bits/stdc++.h>
using namespace std;
using lint = long long int;

vector< vector<lint> > prime_table(int n) {
  vector< vector<lint> > prime(n + 1);
  for(int i = 2; i * i <= n; i++) {
    if(prime[i].size()) continue;
    for(int j = i + i; j <= n; j += i) {
      prime[j].push_back(i);
    }
  }
  return prime;
}

void leave(string message) {
  cout << message << endl;
  exit(0);
}

int main() {
  lint N;
  cin >> N;
  vector<lint> A(N);
  for(auto& elem : A) cin >> elem;

  if(count(A.begin(), A.end(), 1)) leave("not coprime");

  bool pairwise = true;
  auto pt = prime_table(1123456);
  pt[2].push_back(2);
  for(auto& e : pt[2])  cout << e << " \n"[&e == &pt[2].back()];

  set<lint> st;
  for(auto a : A) {
    for(auto prime : pt[a]) {
      if(st.count(prime)) {
        pairwise = false;
        break;
      }
      st.insert(prime);
    }
  }

  if(pairwise) leave("pairwise coprime");

  lint g = A[0];
  for(auto a : A) g = gcd(a, g);
  if(g == 1) leave("setwise coprime");

  cout << "not coprime" << endl;
}