#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0LL) return a;
  return gcd(b, a % b);
}
long long bigmod(long long a, long long b, long long mod) {
  if (b == 0LL) return 1LL;
  long long sq = bigmod(a, b / 2LL, mod);
  sq = (sq * sq) % mod;
  if (b & 1LL) return (sq * (a % mod)) % mod;
  return sq;
}
bool prime[(int)(1e6 + 5) + 1];
vector<int> primes;
int main() {
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= (int)(1e6 + 5); p++) {
    if (prime[p]) {
      for (int i = p * p; i <= (int)(1e6 + 5); i += p) prime[i] = false;
    }
    for (int i = 2; i <= (int)(1e6 + 5); i++)
      if (prime[i]) primes.push_back(i);
  }
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  map<int, bool> used;
  bool pp = 1;
  for (auto &j : a) {
    cin >> j;
    int x = j;
    for (int i = 0; primes[i] * primes[i] <= x; i++) {
      int p = primes[i];
      bool flag = 0;
      while (x % p == 0) {
        x /= p;
        flag = 1;
      }
      if (flag) {
        if (!used[p])
          used[p] = 1;
        else {
          pp = 0;
          break;
        }
      }
    }
    if (x > 2) {
      if (!used[x])
        used[x] = 1;
      else {
        pp = 0;
        break;
      }
    }
  }
  int gc = 0;
  for (auto x : a) gc = gcd(x, gc);
  if (gc > 1)
    cout << "not coprime\n";
  else {
    if (pp)
      cout << "pairwise coprime\n";
    else
      cout << "setwise coprime\n";
  }
  return 0;
}
