#include <bits/stdc++.h>
#pragma GCC optimize("-O2")
using namespace std;
const int mul1 = 1003, mul2 = 5, mul3 = 8;
const int MOD3 = 179424673, MOD2 = 982451653, MOD1 = 1190494759;
const long double EPS = 1e-9;
long long N;
vector<long long> A;
vector<long long> primes;
vector<long long> cl(1000001, 0);
set<long long> all_p;
void build_primes() {
  primes.push_back(2);
  all_p.insert(2);
  for (int i = 3; i < 1001; ++i) {
    bool p = true;
    for (auto &x : primes) {
      if (i % x == 0) {
        p = false;
        break;
      }
    }
    if (p) {
      primes.push_back(i);
      all_p.insert(i);
    }
  }
}
int main() {
  cin >> N;
  build_primes();
  for (int i = 0; i < N; ++i) {
    long long a;
    cin >> a;
    A.push_back(a);
    for (auto &x : primes) {
      if (a % x == 0) cl[x]++;
      while (a % x == 0) {
        a /= x;
      }
    }
    if (a != 1) {
      cl[a]++;
    }
  }
  string out = "pairwise coprime";
  for (int i = 0; i < N + 1; ++i) {
    if (cl[i] > 1) {
      out = "setwise coprime";
    }
    if (cl[i] == N) {
      out = "not coprime";
      break;
    }
  }
  cout << "setwise coprime" << endl;
  return 0;
}
