#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  return (a % b) ? gcd(b, a % b) : b;
}
template <typename T>
T lcm(T a, T b) {
  return a * b / gcd(a, b);
}
const int max = 1000005;
struct Sieve {
  int n;
  vector<int> f, primes;
  Sieve(int n = 1) : n(n), f(n + 1) {
    f[0] = f[1] = -1;
    for (long long i = 2; i < n; ++i) {
      if (f[i]) continue;
      primes.push_back(i);
      f[i] = i;
      for (long long j = i * i; j <= n; j += i) {
        if (!f[j]) f[j] = i;
      }
    }
  }
  bool isPrime(int x) { return f[x] == x; }
  set<int> factor(int x) {
    set<int> res;
    while (x != 1) {
      res.insert(f[x]);
      x /= f[x];
    }
    return res;
  }
};
int main(void) {
  Sieve sieve(1e6 + 5);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> tmp(n + 4, 0);
  for (int i = 0; i < n; i++) {
    auto fi = sieve.factor(a[i]);
    for (auto p : fi) {
      tmp[p]++;
    }
  }
  bool ispair = true, isset = true;
  for (int i = 0; i < n; i++) {
    if (sieve.isPrime(i)) {
      if (tmp[i] != 1 && tmp[i] != 0) ispair = false;
      if (tmp[i] == n) isset = false;
    }
  }
  if (ispair) {
    cout << "pairwise coprime" << endl;
  } else if (isset) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
