#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
ostream& operator<<(ostream& out, const pair<A, B>& a) {
  out << "(" << a.first << "," << a.second << ")";
  return out;
}
template <typename T, size_t N>
ostream& operator<<(ostream& out, const array<T, N>& a) {
  out << "[";
  bool first = true;
  for (auto& v : a) {
    out << (first ? "" : ", ");
    out << v;
    first = 0;
  }
  out << "]";
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, const vector<T>& a) {
  out << "[";
  bool first = true;
  for (auto& v : a) {
    out << (first ? "" : ", ");
    out << v;
    first = 0;
  }
  out << "]";
  return out;
}
template <typename T, class Cmp>
ostream& operator<<(ostream& out, const set<T, Cmp>& a) {
  out << "{";
  bool first = true;
  for (auto& v : a) {
    out << (first ? "" : ", ");
    out << v;
    first = 0;
  }
  out << "}";
  return out;
}
template <typename U, typename T, class Cmp>
ostream& operator<<(ostream& out, const map<U, T, Cmp>& a) {
  out << "{";
  bool first = true;
  for (auto& p : a) {
    out << (first ? "" : ", ");
    out << p.first << ":" << p.second;
    first = 0;
  }
  out << "}";
  return out;
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << ": " << arg1 << " |";
  __f(comma + 1, args...);
}
using ll = long long;
using P = pair<long long, long long>;
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
signed main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (n); i++) cin >> a[i];
  long long g = a[0];
  for (long long i = 1; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<long long> vis(1100000);
  for (long long i = 2; i < 1100000; i++) {
    for (long long j = i + i; j < 1100000; j += i) {
      if (vis[i]) continue;
      vis[j] = 1;
    }
  }
  vis[0] = 1;
  vis[1] = 1;
  vector<long long> res;
  for (long long i = 0; i < (1100000); i++)
    if (!vis[i]) res.push_back(i);
  vector<long long> cnt(1100000);
  for (long long i = 0; i < (n); i++) {
    long long x = a[i];
    for (auto p : res) {
      if (x % p == 0) {
        if (cnt[x]) {
          cout << "setwise coprime" << endl;
          return 0;
        }
        cnt[x] = 1;
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
