#include <bits/stdc++.h>
const long long INF = 1LL << 60;
using namespace std;
using ll = long long;
using P = pair<int, int>;
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;
}
const int A = 1e6 + 9;
const int MAX = A;
vector<int> is_prime(MAX, 1);
long long GCD(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
int main() {
  is_prime[0] = 0, is_prime[1] = 0;
  for (int i = 2; i < MAX; ++i) {
    if (!is_prime[i]) continue;
    for (int j = i * 2; j < MAX; j += i) is_prime[j] = 0;
  }
  int n;
  cin >> n;
  vector<int> a(n);
  vector<int> c(A);
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
    c[a[i]]++;
  }
  bool pairwize = true;
  for (int i = 2; i < (A); i++) {
    if (!is_prime[i]) continue;
    int cnt = 0;
    for (int j = 1; i * j <= A; ++j) {
      cnt += c[j];
      if (cnt > 1) pairwize = false;
    }
  }
  if (pairwize) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = 0;
  for (int i = 0; i < (n); i++) {
    g = (int)GCD((ll)g, (ll)a[i]);
    if (g == 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "not coprime" << endl;
  return 0;
}
