#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
const long long MOD = 1000000007;
const int mmax = 1000009;
int main(void) {
  int n;
  cin >> n;
  vector<int> A(n);
  for (int i = 0; i < (int)(n); i++) cin >> A[i];
  vector<int> seen(mmax, -1);
  bool pairwise = true;
  for (int i = 0; i < (int)(n); i++) {
    for (int j = A[i]; j > 1; --j) {
      if (A[i] % j != 0) continue;
      if (seen[j] != -1) {
        pairwise = false;
      }
      seen[j]++;
    }
  }
  if (pairwise)
    puts("pairwise coprime");
  else {
    bool setwise = true;
    for (int i = 0; i < (int)(mmax); i++) {
      if (seen[i] == n - 1) {
        setwise = false;
      }
    }
    if (setwise)
      puts("setwise coprime");
    else
      puts("not coprime");
  }
  return 0;
}
