#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
vector<int> sieve(int n) {
  vector<int> res;
  vector<bool> is_prime(n + 1, true);
  is_prime[0] == false;
  is_prime[1] == false;
  for (int i = 2; i <= n; i++) {
    if (!is_prime[i]) continue;
    res.push_back(i);
    for (int j = 2 * i; j <= n; j += i) {
      is_prime[j] = false;
    }
  }
  return res;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (int)(N); i++) cin >> A[i];
  bool ok = true;
  const int A_MAX = 1000005;
  vector<int> primes = sieve(A_MAX);
  int pn = primes.size();
  map<int, int> G;
  for (int i = 0; i < (int)(N); i++) {
    int willbreak = false;
    for (int j = 0; j < (int)(pn); j++) {
      if (G[primes[j]] > 1) {
        willbreak = true;
        break;
      }
      if (A[i] % primes[j] == 0) G[primes[j]]++;
    }
    if (willbreak) break;
  }
  for (auto x : G) {
    if (x.second > 1) {
      ok = false;
      break;
    }
  }
  if (ok) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  ok = true;
  int y = A[0];
  for (int i = 0; i < (int)(N - 1); i++) {
    y = gcd(y, A[i + 1]);
    if (y == 1) break;
  }
  if (y != 1) ok = false;
  if (ok) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
