#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PL = pair<ll, ll>;
using P = pair<int, int>;
constexpr int INF = 1000000000;
constexpr long long HINF = 1000000000000000;
constexpr long long MOD = 1000000007;
constexpr double EPS = 1e-4;
constexpr double PI = 3.14159265358979;
template <class T>
T gcd(T a, T b) {
  return (b ? gcd(b, a % b) : a);
}
vector<int> sieve(int n) {
  vector<bool> prime(n + 1, true);
  prime[0] = false;
  prime[1] = false;
  for (int i = 3; i * i <= n; i += 2) {
    if (prime[i]) {
      int j = 2;
      while (i * j <= n) {
        prime[i * j] = false;
        j++;
      }
    }
  }
  vector<int> ans = {2};
  for (int i = 3; i < n + 1; i += 2) {
    if (prime[i]) ans.push_back(i);
  }
  return ans;
}
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> A(1000010);
  for (int i = 0; i < (int)(N); i++) {
    int a;
    cin >> a;
    A[a]++;
  }
  vector<int> primes = sieve(1000010);
  bool pairco = true;
  for (int i = 0; i < (int)(1000010); i++) {
    if (A[i] > 1) {
      pairco = false;
      break;
    }
  }
  for (int p : primes) {
    int cnt = 0;
    for (int j = p; j < 1000010; j += p) {
      if (A[j] > 0) ++cnt;
    }
    if (cnt > 1) {
      pairco = false;
      break;
    }
  }
  if (pairco) {
    cout << "pairwise coprime" << '\n';
    return 0;
  }
  int g = 0;
  for (int i = 0; i < (int)(1000010); i++) {
    if (A[i] > 0) g = gcd(g, i);
  }
  if (g == 1)
    cout << "setwise coprime" << '\n';
  else
    cout << "not coprime" << '\n';
  return 0;
}
