#include <bits/stdc++.h>
using namespace std;
vector<int> Eratosthenes(const int N) {
  vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  vector<int> P;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> P = Eratosthenes(1005);
  vector<int> s(1005);
  int judge1 = 1;
  int judge2 = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < P.size(); j++) {
      if (a[i] % P[j] == 0) {
        if (s[P[j]]) judge1 = 0;
        s[P[j]]++;
        if (s[P[j]] == n) judge2 = 0;
      }
    }
  }
  if (judge1)
    cout << "pairwise coprime" << endl;
  else if (judge2)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
