#include <bits/stdc++.h>
using namespace std;

int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  
  vector<bool> B(1e6 + 1, 1);
  B.at(0) = B.at(1) = 0;
  for (long i = 2; i <= 1e6; i++) {
    if (B.at(i)) for (long j = i * i; j <= 1e6; j += i) B.at(j) = 0;
  }
  
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A.at(i);

  for (int i = 2; i <= 1e6; i++) {
    if (!B.at(i)) continue;
    for (int j = 0, b = 0; j < N; j++) {
      if (A.at(j) % i == 0) {
        if (b) goto NG;
        else b = 1;
      }
    }
  }
  return cout << "pairwise coprime" << "\n", 0;
  NG:;
  
  int G = 0;
  for (int i = 0; i < N; i++) {
    G = gcd(G, A.at(i));
  }
  cout << ((G == 1) ? "setwise coprime" : "not coprime") << "\n";
}