#include <bits/stdc++.h>
using namespace std;
bool prm[1110];
long long n, sz[1110];
vector<long long> prime, big;
set<long long> nbg;
int main() {
  long long i, j, a;
  memset(prm, true, sizeof(prm));
  prm[0] = prm[1] = false;
  for (i = 2; i < 1110; i++) {
    if (!prm[i]) {
      continue;
    }
    prime.push_back(i);
    for (j = i + i; j < 1110; j += i) {
      prm[j] = false;
    }
  }
  scanf("%lld", &n);
  for (i = 0; i < n; i++) {
    scanf("%lld", &a);
    for (j = 0; j < prime.size(); j++) {
      if (a % prime[j] == 0) {
        sz[j]++;
      }
      while (a % prime[j] == 0) {
        a /= prime[j];
      }
    }
    if (a != 1) {
      nbg.insert(a);
      big.push_back(a);
    }
  }
  if (nbg.size() == 1) {
    puts("not coprime");
    return 0;
  }
  if (big.size() != nbg.size()) {
    puts("setwise coprime");
    return 0;
  }
  for (i = 0; i < prime.size(); i++) {
    if (sz[i] == n) {
      puts("not coprime");
      return 0;
    }
    if (sz[i] > 1) {
      puts("setwise coprime");
      return 0;
    }
  }
  puts("pairwise coprime");
  return 0;
}
