#include <bits/stdc++.h>
using namespace std;
int primes[1000001];
void spf() {
  for (int i = 2; i * i <= 1000000; ++i) {
    if (!primes[i]) {
      for (int j = i; j <= 1000000; j += i) {
        primes[j] = i;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  spf();
  int n;
  cin >> n;
  vector<int> vec(n);
  for (int i = 0; i < n; ++i) {
    cin >> vec[i];
  }
  int seen[1000001] = {0};
  vector<int> nums;
  for (int i = 0; i < n; ++i) {
    int val = vec[i];
    set<int> current;
    while (val > 1) {
      int factor = primes[val];
      current.insert(factor);
      val /= factor;
    }
    for (int i : current) seen[i] += 1;
  }
  bool pairwise = true;
  bool notprime = false;
  for (int i = 1; i <= 1000000; ++i) {
    if (seen[i] > 1) pairwise = false;
    if (seen[i] == n) notprime = true;
  }
  if (notprime)
    cout << "not coprime\n";
  else if (pairwise)
    cout << "pairwise coprime\n";
  else
    cout << "setwise coprime\n";
  return 0;
}
