#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e12;
const int inf = 1e9;
const int mod = 1e9 + 7;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
__attribute__((constructor)) void init() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << fixed << setprecision(10);
}
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
long long ngcd(vector<long long> a) {
  long long res;
  res = a[0];
  for (int i = 1; i < a.size() && res != 1; i++) {
    res = gcd(a[i], res);
  }
  return res;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long nlcm(vector<long long> numbers) {
  long long res;
  res = numbers[0];
  for (long long i = 1; i < numbers.size(); i++) {
    res = lcm(res, numbers[i]);
  }
  return res;
}
vector<int> hako(1000010, 0);
void yakusu(long long n) {
  for (long long i = 2; i * i < n; i++) {
    if (n % i == 0) hako[i]++;
  }
  hako[n]++;
}
bool ok = 1;
void solve(long long n) {
  for (long long i = 2; i * i < n; i++) {
    if (n % i == 0) {
      if (hako[i] > 1) ok = 0;
    }
  }
  if (hako[n] > 1) ok = 0;
}
signed main() {
  long long n;
  cin >> n;
  vector<long long> v(n, 0);
  for (int i = 0; i < (n); i++) cin >> v[i];
  for (int i = 0; i < (n); i++) yakusu(v[i]);
  for (int i = 0; i < (n); i++) {
    if (ok == 1) solve(v[i]);
  }
  if (ok) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (ngcd(v) == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  } else
    cout << "not coprime" << endl;
  return 0;
}
