#include <bits/stdc++.h>
using namespace std;
vector<long long int> primes;
void ESieve(long long int n) {
  vector<bool> sieve(n + 1, true);
  sieve[0] = sieve[1] = false;
  for (long long int i = 2; i <= n; i++) {
    if (sieve[i]) {
      primes.push_back(i);
      for (long long int j = i * i; j <= n; j += i) {
        sieve[j] = false;
      }
    }
  }
}
int main() {
  ESieve(1010);
  map<long long int, long long int> counts;
  int n;
  cin >> n;
  long long int a;
  for (int i = 0; i < n; i++) {
    cin >> a;
    bool is_prime = true;
    for (auto p : primes) {
      if (a % p == 0) {
        is_prime = false;
        counts[p]++;
      }
    }
    if (is_prime) {
      counts[a]++;
    }
  }
  bool pairwise_coprime = true;
  bool not_coprime = false;
  for (auto it : counts) {
    if (it.second > 1) {
      pairwise_coprime = false;
      if (it.second == n) {
        not_coprime = true;
      }
    }
  }
  if (not_coprime) {
    cout << "not coprime\n";
  } else if (pairwise_coprime) {
    cout << "pairwise coprime\n";
  } else {
    cout << "setwise coprime\n";
  }
  return 0;
}
