#include <bits/stdc++.h>
using namespace std;
vector<bool> is_prime;
void p_ini(int n) {
  is_prime.resize(n, true);
  is_prime[0] = false;
  is_prime[1] = false;
  for (int i = 2; i < n; i++) {
    if (!is_prime[i]) continue;
    for (int j = i * 2; j < n; j += i) is_prime[j] = false;
  }
  return;
}
vector<long long> prime_factor(long long n) {
  vector<long long> prime_factor_n;
  long long sqrt_n = sqrt(n) + 10;
  for (int(i) = 0; (i) < (sqrt_n); (i)++) {
    if (!is_prime[i]) continue;
    if (n % i == 0) {
      long long count = 0;
      prime_factor_n.push_back(i);
      while (1) {
        n /= i;
        count++;
        if (n % i != 0) break;
      }
    }
  }
  if (n > 1) prime_factor_n.push_back(n);
  return prime_factor_n;
}
int main() {
  int N;
  cin >> N;
  p_ini(2000000);
  map<int, int> pnum;
  vector<long long> AA(N);
  for (int(i) = 0; (i) < (N); (i)++) {
    long long A;
    cin >> A;
    AA[i] = A;
    vector<long long> pl = prime_factor(A);
    for (int ptmp : pl) {
      pnum[ptmp]++;
    }
  }
  string ans = "pairwise coprime";
  if (N > 200000) {
    ans = "setwise coprime";
    vector<long long> pl = prime_factor(AA[0]);
    for (int i : pl) {
      bool B = 1;
      for (int(j) = 0; (j) < (N); (j)++) {
        if (AA[j] % i != 0) {
          B = 0;
          break;
        }
      }
      if (B) {
        ans = "not coprime";
        break;
      }
    }
  } else {
    for (int(i) = 0; (i) < (is_prime.size()); (i)++) {
      if (pnum[i] == N) {
        ans = "not coprime";
        break;
      }
      if (pnum[i] >= 2) {
        ans = "setwise coprime";
      }
    }
  }
  cout << ans << endl;
  return 0;
}
