#include <bits/stdc++.h>
using namespace std;
int const INF = 1001001001;
long long const LINF = 1001001001001001001;
long long const MOD = 1000000007;
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
long long N;
long long A[1000000];
int main() {
  cin >> N;
  for (int i = 0; i < N; i++) cin >> A[i];
  long long maxi = 0;
  for (int i = 0; i < N; i++) maxi = max(maxi, A[i]);
  vector<long long> D(maxi + 1);
  for (int i = 2; i <= maxi; i++) {
    long long k = 2;
    while (i % k != 0) k++;
    D[i] = k;
  }
  vector<long long> cnt(1001);
  for (int i = 0; i < N; i++) {
    long long a = A[i];
    while (a > 1) {
      long long m = D[a];
      while (a % m == 0) a /= m;
      cnt[m]++;
    }
  }
  bool flag = true;
  for (int i = 0; i < 1000; i++) {
    if (cnt[i] > 1) flag = false;
  }
  if (flag) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long g = 0;
  for (int i = 0; i < N; i++) {
    g = gcd(g, A[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
