#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MAX = 1e6 + 1;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
class Prime {
  vector<bool> is_prime;
  int n;

 public:
  Prime(int n) : n(n) {
    is_prime.resize(n + 1, true);
    is_prime[0] = is_prime[1] = false;
    for (int i = 2; i <= n; i++) {
      if (is_prime[i]) {
        for (int j = 2 * i; j <= n; j += i) is_prime[j] = false;
      }
    }
  }
  bool operator[](const int &k) const { return is_prime[k]; }
};
int main() {
  int n;
  cin >> n;
  ll a[n];
  for (int i = 0; i < (int)n; i++) cin >> a[i];
  vector<ll> v(MAX);
  ll g = a[0];
  for (int i = 0; i < (int)n; i++) g = gcd(g, a[i]);
  Prime prime(MAX);
  bool f = true;
  for (int i = 2; i < MAX; i++) {
    if (prime[i]) {
      int res = 0;
      for (int j = 0; j < (int)n; j++) {
        if (a[j] % i == 0) {
          res++;
          if (res >= 2) break;
        }
      }
      if (res >= 2) {
        f = false;
        break;
      }
    }
  }
  if (f)
    cout << "pairwise coprime" << endl;
  else if (g == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
