#include <bits/stdc++.h>
using namespace std;
long long gcd(long long m, long long n) {
  long long tmp;
  while (m % n) {
    tmp = n;
    n = m % n;
    m = tmp;
  }
  return n;
}
set<long long> prime_factor(long long n) {
  set<long long> primes;
  for (long long i = 2; i * i <= n; ++i) {
    if (n % i == 0) primes.insert(i);
  }
  if (n != 1) {
    primes.insert(n);
  }
  return primes;
}
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<long long> a(n);
  long long g;
  bool ispair = true;
  vector<int> e(1000100, 0);
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    if (i == 0) {
      g = a[i];
    } else {
      g = gcd(g, a[i]);
    }
    if (a[i] == 1) continue;
    if (ispair) {
      if (e[a[i]] > 0)
        ispair = false;
      else {
        set<long long> pri = prime_factor(a[i]);
        for (long long base : pri) {
          if (e[base] > 0) continue;
          long long mul = 1;
          while (base * mul <= 1000000) {
            ++e[base * mul];
            ++mul;
          }
        }
      }
    }
  }
  if (ispair)
    puts("pairwise coprime");
  else if (g == 1)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
