#include <bits/stdc++.h>
using namespace std;
int64_t MOD = 1000000007;
double PI = 3.141592653589793;
unordered_map<int64_t, int64_t> bunkai(int64_t N) {
  unordered_map<int64_t, int64_t> hist;
  int64_t a = 2;
  while (N >= a * a) {
    if (N % a == 0) {
      hist[a]++;
      N /= a;
    } else
      a++;
  }
  hist[N]++;
  return hist;
}
int64_t gcd(int64_t p, int64_t q) {
  if (p < q) swap(p, q);
  if (p % q == 0)
    return q;
  else
    return gcd(q, p % q);
}
int main() {
  int N;
  cin >> N;
  vector<int> list(N);
  for (int i = 0; i < N; i++) cin >> list[i];
  bool pair = true, flag = false;
  unordered_map<int, int> pairwise;
  for (int i = 0; i < N; i++) {
    auto tmp = bunkai(list[i]);
    for (auto x : tmp) {
      if (pairwise[x.first] != 0) {
        pair = false;
        flag = true;
        break;
      } else
        pairwise[x.first] = x.second;
      if (flag) break;
    }
  }
  if (pair)
    cout << "pairwise coprime";
  else {
    int tmp = list[0];
    for (int i = 1; i < N; i++) {
      tmp = gcd(tmp, list[i]);
      if (tmp == 1) {
        cout << "setwise coprime";
        break;
      }
    }
    if (tmp == 1)
      cout << "setwise coprime";
    else
      cout << "not coprime";
  }
}
