#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
ll gcd(ll a, ll b) {
  if (a % b == 0) return b;
  ll k = a % b;
  return gcd(b, k);
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  bool can = true;
  vector<int> isprime(1000005, 1);
  isprime[0] = 0;
  isprime[1] = 0;
  for (int i = 0; i < (1000005); ++i) {
    if (isprime[i]) {
      for (int j = 2 * i; j < 1000005; j += i) {
        isprime[j] = 0;
      }
    }
  }
  set<int> st;
  for (int i = 0; i < (n); ++i) {
    for (int j = 0; j < (a[i]); ++j) {
      if (isprime[j]) {
        if (a[i] % j == 0) {
          if (st.count(j)) {
            can = false;
            break;
          } else {
            st.insert(j);
          }
        }
      }
    }
  }
  if (can) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = 0;
  for (int i = 0; i < (n); ++i) g = gcd(g, a[i]);
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
