#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const long long MAX = 200002;
const long long MOD = 1000000007;
long long modpow(long long a, long long n, long long mod) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
signed main() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long ans1 = a[0], ans2 = 1;
  for (long long i = 1; i < n; i++) {
    long long p = a[i - 1], q = a[i];
    if (p > q) swap(p, q);
    while (p != 0) {
      q %= p;
      swap(p, q);
    }
    ans2 = max(ans2, q);
    p = ans1;
    q = a[i];
    if (p > q) swap(p, q);
    while (p != 0) {
      q %= p;
      swap(p, q);
    }
    ans1 = q;
  }
  if (ans1 == 1) {
    if (ans2 == 1)
      cout << "pairwise coprime" << endl;
    else
      cout << "setwise coprime" << endl;
  } else
    cout << "not coprime" << endl;
}
