#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 (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int mygcd(int a, int b) {
  if (b == 0) return a;
  return mygcd(b, a % b);
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = (0); i < (n); i++) cin >> a[i];
  long long g = a[0];
  for (int i = (0); i < (n - 1); i++) g = mygcd(g, a[i + 1]);
  if (g > 1) {
    cout << "not coprime" << endl;
    exit(0);
  }
  int max_n = 1010101;
  vector<bool> isprime(max_n, true);
  isprime[0] = isprime[1] = false;
  for (int i = 2; i < max_n; i++) {
    if (isprime[i]) {
      for (int j = 2 * i; j < max_n; j += i) isprime[j] = false;
    }
  }
  vector<int> primes;
  for (int i = (0); i < (max_n); i++)
    if (isprime[i]) primes.push_back(i);
  set<int> stall;
  for (int i = (0); i < (n); i++) {
    int t = a[i];
    set<int> st;
    for (int p : primes) {
      while (t % p == 0) {
        if (st.count(p) == 0) st.insert(p);
        t /= p;
      }
    }
    for (int x : st) {
      if (stall.count(x) == 1) {
        cout << "setwise coprime" << endl;
        exit(0);
      }
      stall.insert(x);
    }
  }
  cout << "pairwise coprime" << endl;
}
