#include <bits/stdc++.h>
using namespace std;
vector<long long> min_eratosthenes(long long n) {
  vector<long long> min_prime(n + 1, -1);
  min_prime[0] = 0;
  min_prime[1] = 1;
  for (long long i = 2; i * i <= n; i++) {
    if (min_prime[i] == -1) {
      for (long long j = 1; i * j <= n; j++) min_prime[i * j] = i;
    }
  }
  for (long long i = 0; i <= n; i++) {
    if (min_prime[i] == -1) min_prime[i] = i;
  }
  return min_prime;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < long long(n); i++) cin >> a[i];
  long long max_a = 0;
  for (long long i = 0; i < long long(n); i++) max_a = max(max_a, a[i]);
  vector<long long> min_prime = min_eratosthenes(max_a);
  vector<long long> num(max_a + 1, 0);
  for (long long i = 0; i < long long(n); i++) {
    set<long long> st;
    while (a[i] != 1) {
      st.insert(min_prime[a[i]]);
      a[i] /= min_prime[a[i]];
    }
    for (auto x : st) {
      num[x]++;
    }
  }
  long long ans = 0;
  for (long long i = 0; i < long long(max_a + 1); i++) ans = max(ans, num[i]);
  if (ans == 1)
    cout << "pairwise coprime";
  else if (ans == n)
    cout << "not coprime";
  else
    cout << "setwise coprime";
  return 0;
}
