#include <bits/stdc++.h>
using namespace std;
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;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  vector<int> cnt(1000005);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  bool pairwise = true;
  for (int i = 2; i <= 1000000; i++) {
    int tmp = 0;
    for (int j = i; j <= 1000000; j += i) {
      if (cnt[j] > 0) {
        tmp++;
      }
    }
    if (tmp >= 2) {
      pairwise = false;
      break;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  bool setwise = true;
  int val = a[0];
  for (int i = 1; i < n; i++) {
    val = gcd(val, a[i]);
  }
  if (val > 1) setwise = false;
  if (setwise) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
