#include <bits/stdc++.h>
using namespace std;
int n;
int a[1000005];
set<int> S[1000005];
set<int> A;
bool pairwise = true;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int gcd_all() {
  int ans = a[0];
  for (int i = 1; i < n; i++) ans = gcd(ans, a[i]);
  return ans;
}
set<int> prime_factor(int n) {
  set<int> res;
  for (int i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      res.insert(i);
      n /= i;
    }
  }
  if (n != 1) res.insert(n);
  return res;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    S[i] = prime_factor(a[i]);
    int len = S[i].size();
    int lenA = A.size();
    while (S[i].size() != 0) {
      int t = *S[i].begin();
      A.insert(t);
      S[i].erase(t);
    }
    int len_A = A.size();
    if (len_A != len + lenA) pairwise = false;
  }
  if (pairwise == true)
    cout << "pairwise coprime";
  else if (gcd_all() != 1)
    cout << "not comprime";
  else
    cout << "setwise coprime";
}
