#include <bits/stdc++.h>
using namespace std;
const long long int INF = (1LL << 60);
const int INF_INT = 2147483647 - 1e6 - 1;
const long long int mod = 1000000007ll;
const int mod_int = 1000000007;
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
long long int N;
vector<long long int> A;
string ans = "not coprime";
void solve() {
  const int MAX_NUM = 1000000;
  sort(A.begin(), A.end(), greater<long long int>());
  vector<long long int> exist(MAX_NUM + 1, 0);
  for (int i = 0; i < N; i++) exist[A[i]]++;
  auto PC = [&]() {
    for (long long int i = 2; i <= MAX_NUM; i++) {
      int num = 0;
      for (long long int j = i; j <= MAX_NUM; j += i) {
        if (exist[j]) {
          num++;
        }
      }
      if (num >= 2) return false;
    }
    return true;
  };
  if (PC()) {
    ans = "pairwise coprime";
    return;
  }
  auto SC = [&]() {
    vector<long long int> numof_appeard(MAX_NUM + 1, 0);
    for (long long int i = 2; i <= MAX_NUM; i++) {
      for (long long int j = i; j <= MAX_NUM; j += i) {
        if (exist[j]) {
          numof_appeard[i]++;
        }
      }
    }
    for (int i = 0; i <= MAX_NUM; i++) {
      if (numof_appeard[i] == N) return false;
    }
    return true;
  };
  if (SC()) {
    ans = "setwise coprime";
    return;
  }
}
int main() {
  cin >> N;
  A = vector<long long int>(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  solve();
  cout << ans << endl;
  return 0;
}
