#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007LL;
const long long INF = 1LL << 60;
using vll = vector<long long>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using vc = vector<char>;
using vvc = vector<vc>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
long long dx[4] = {0, 1, 0, -1};
long long dy[4] = {1, 0, -1, 0};
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
bool p = false;
map<long long, long long> insuu;
void prime_factor(long long n) {
  long long k = n;
  set<long long> s;
  for (long long i = 2; i * i <= n; i++) {
    while (k % i == 0) {
      s.insert(i);
      k /= i;
    }
  }
  if (k != 1) {
    s.insert(k);
  }
  for (auto ss : s) {
    if (insuu.count(ss)) {
      p = true;
      return;
    } else {
      insuu[ss]++;
    }
    return;
  }
}
int main() {
  long long n;
  cin >> n;
  vll a(0);
  bool h = false;
  for (long long i = 0; i < (n); i++) {
    long long b;
    cin >> b;
    if (b == 1) {
      h = true;
      continue;
    }
    a.push_back(b);
  }
  if (h) a.push_back(1);
  long long g = a[0];
  n = (long long)(a).size();
  for (long long i = 0; i < (n); i++) {
    g = gcd(g, a[i]);
  }
  if (g != 1) {
    cout << ("not coprime") << "\n";
  } else {
    if (n > 80000) {
      cout << ("setwise coprime") << "\n";
    } else {
      for (long long i = 0; i < (n); i++) {
        prime_factor(a[i]);
      }
      if (p) {
        cout << ("setwise coprime") << "\n";
      } else {
        cout << ("pairwise coprime") << "\n";
      }
    }
  }
}
