#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ui = unsigned int;
using ld = long double;
template <typename T>
ostream &operator<<(ostream &stream, vector<T> v) {
  for (const auto &it : v) stream << it << " ";
  return stream;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &ostream, pair<T1, T2> p) {
  ostream << p.first << " " << p.second;
  return ostream;
}
void swap(long long a, long long b) {
  long long t = a;
  a = b;
  b = t;
}
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
void solve(long long tc) {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  bool isPairWise = 1;
  long long suff[n];
  suff[n - 1] = a[n - 1];
  for (long long i = n - 2; i >= 0; i--) {
    suff[i] = suff[i + 1] * a[i];
  }
  for (long long i = 0; i < n - 1; i++) {
    if (gcd(a[i], suff[i + 1]) != 1) {
      isPairWise = 0;
      break;
    }
  }
  if (isPairWise) {
    cout << "pairwise coprime";
    return;
  }
  long long g = a[0];
  for (long long i = 1; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime";
    return;
  }
  cout << "not coprime";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long t = 1;
  for (long long i = 1; i <= t; i++) {
    solve(i);
  }
  return 0;
}
