#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vp = vector<P>;
using vl = vector<ll>;
template <typename T>
void Yes(T flag) {
  cout << (flag ? "Yes" : "No") << endl;
}
template <typename T>
void pv(vector<T> vec) {
  cout << "[";
  for (auto& v : vec) {
    cout << v << ",";
  }
  cout << "]" << endl;
}
template <>
void pv(vector<P> vec) {
  cout << "[";
  for (auto& v : vec) {
    cout << "<" << v.first << "," << v.second << ">"
         << ",";
  }
  cout << "]" << endl;
}
template <typename T>
void pv2(vector<vector<T>> vec) {
  for (auto& v : vec) pv(v);
}
struct PrimeTable {
  int n;
  vector<int> sieve, primes;
  PrimeTable(int n) : n(n), sieve(n + 1) {
    sieve[0] = sieve[1] = -1;
    for (long long i = 2; i < n + 1; ++i) {
      if (sieve[i]) continue;
      primes.emplace_back(i);
      sieve[i] = i;
      for (long long j = i * i; j <= n; j += i)
        if (!sieve[j]) sieve[j] = i;
    }
  }
  bool isPrime(int m) { return sieve[m] == m; }
  vector<int> factorList(int x) {
    vector<int> res;
    if (x == 0) {
      res.emplace_back(0);
      return res;
    } else if (x == 1) {
      res.emplace_back(1);
      return res;
    }
    while (x != 1) {
      res.emplace_back(sieve[x]);
      x /= sieve[x];
    }
    return res;
  }
  vector<pair<int, int>> factorPair(int x) {
    vector<int> fl = factorList(x);
    vector<pair<int, int>> res(1, pair<int, int>(fl[0], 0));
    for (int p : fl) {
      if (res.back().first == p)
        res.back().second++;
      else
        res.emplace_back(p, 1);
    }
    return res;
  }
};
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n;
  cin >> n;
  vi a(n, 0);
  for (long long i = 0; i < (n); ++i) cin >> a.at(i);
  PrimeTable p = PrimeTable(1000005);
  vi s(1000005, 0);
  bool flag = true;
  for (long long i = 0; i < (n); ++i) {
    vector<int> pa = p.factorList(a.at(i));
    int x = pa.at(0);
    if (!s.at(x))
      s.at(x)++;
    else {
      flag = false;
      break;
    }
    for (long long j = 0; j < (pa.size()); ++j) {
      if (x != pa.at(j)) {
        x = pa.at(j);
        if (!s.at(x))
          s.at(x)++;
        else {
          flag = false;
          break;
        }
      }
    }
    if (!flag) break;
  }
  if (flag) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int ans = a.at(0);
  for (long long i = 1; i <= (n - 1); ++i) {
    ans = gcd(ans, a.at(i));
  }
  if (ans == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
