#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007LL;
const double PI = 3.14159265358979323846;
template <class T>
bool prime_factorization(T n, map<int, int>& ret, map<int, int>& ret2) {
  bool flags = false;
  map<int, int> tmp;
  for (long long i = 2; i * i <= n; ++i) {
    while (n % i == 0) {
      if (ret[i] != 0) flags = true;
      tmp[i]++;
      n /= i;
    }
  }
  if (n != 1) {
    if (ret[n] != 0) flags = true;
    tmp[n] += 1;
  }
  for (auto x : tmp) {
    ret[x.first] += x.second;
    ret2[x.first]++;
  }
  return flags;
}
int main() {
  int N;
  cin >> N;
  vector<long long> A(N);
  map<int, int> mp;
  map<int, int> mp2;
  bool flags = false;
  sort(A.begin(), A.end());
  if (A[0] == A[N - 1]) {
    if (A[0] == 1) {
      cout << "setwise coprime"
           << "\n";
    } else {
      cout << "not coprime"
           << "\n";
    }
    return 0;
  }
  for (int i = 0; i < N; ++i) {
    cin >> A[i];
    flags = max(flags, prime_factorization(A[i], mp, mp2));
  }
  if (flags) {
    bool flags2 = false;
    for (auto x : mp2) {
      if (x.second == N) {
        flags2 = true;
        break;
      }
    }
    if (flags2) {
      cout << "not coprime"
           << "\n";
    } else {
      cout << "setwise coprime"
           << "\n";
    }
  } else {
    cout << "pairwise coprime"
         << "\n";
  }
  return 0;
}
