#include <bits/stdc++.h>
using ll = long long;
using namespace std;
constexpr int MOD = 1e9 + 7;
constexpr ll MOD_LL = ll(1e9 + 7);
template <typename T>
T gcd(T a, T b) {
  if (a < b) swap(a, b);
  T r;
  while (r = a % b) {
    a = b;
    b = r;
  }
  return b;
}
int main(void) {
  int n;
  cin >> n;
  vector<int> a(n), cnt(1e6 + 1, 0);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  int g = a[0];
  for (int i = 1; i < n; ++i) {
    g = gcd(g, a[i]);
  }
  if (g > 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  int maxa = *max_element(a.begin(), a.end());
  vector<int> primes, is_prime(maxa + 1, 1);
  is_prime[0] = 0;
  is_prime[1] = 0;
  for (int i = 2; i <= maxa; ++i) {
    if (is_prime[i]) {
      primes.push_back(i);
      for (int j = i; j <= maxa; j += i) {
        is_prime[j] = 0;
      }
    }
  }
  bool pc = true;
  for (auto& x : primes) {
    int sum = 0;
    for (int i = x; i < maxa; i += x) {
      sum += cnt[i];
      if (sum >= 2) {
        pc = false;
        break;
      }
    }
    if (!pc) break;
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
