#include <bits/stdc++.h>
using namespace std;
const long long MAX = 200000;
const long long INF = 1001001001;
const long long MOD = 1000000007;
const double PI = 3.1415926535897932;
long long N, ans = 0, tmp = 0;
vector<long long> A;
vector<set<long long>> Nums;
string S;
vector<long long> smallest_prime_factors(long long n) {
  vector<long long> spf(n + 1);
  for (long long i = 0; i <= n; i++) spf[i] = i;
  for (long long i = 2; i * i <= n; i++) {
    if (spf[i] == i) {
      for (long long j = i * i; j <= n; j += i) {
        if (spf[j] == j) {
          spf[j] = i;
        }
      }
    }
  }
  return spf;
}
vector<long long> factolization(long long x, vector<long long> &spf) {
  vector<long long> ret;
  while (x != 1) {
    ret.push_back(spf[x]);
    x /= spf[x];
  }
  sort(ret.begin(), ret.end());
  return ret;
}
vector<pair<long long, long long>> prime_factorize(long long N) {
  vector<pair<long long, long long>> res;
  for (long long a = 2; a * a <= N; ++a) {
    if (N % a != 0) continue;
    long long ex = 0;
    while (N % a == 0) {
      ++ex;
      N /= a;
    }
    res.push_back({a, ex});
  }
  if (N != 1) res.push_back({N, 1});
  return res;
}
signed main() {
  cin >> N;
  constexpr long long MAX = 1000000;
  Nums.resize(MAX);
  auto spf = smallest_prime_factors(MAX);
  for (long long i = 0; i < N; i++) {
    long long a;
    cin >> a;
    A.push_back(a);
    tmp += a;
    auto result = factolization(a, spf);
    for (auto z : result) Nums[z].insert(i);
  }
  for (long long i = 2; i < N; i++) {
    long long num = Nums[i].size();
    ans = max(ans, num);
  }
  if (ans <= 1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  const auto &res = prime_factorize(tmp);
  for (auto p : res) {
    long long ok = 0;
    for (long long j = 0; j < N; j++) {
      if (A[j] % p.first != 0) {
        ok = 1;
        break;
      }
    }
    if (ok == 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "not coprime" << endl;
  return 0;
  return 0;
}
