#include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <vector>

using namespace std;

#define rep(i, n) for (int64_t i = 0; i < (int64_t)(n); i++)
#define irep(i, n) for (int64_t i = 0; i <= (int64_t)(n); i++)
#define rrep(i, n) for (int64_t i = (n)-1; i >= 0; i--)
#define rirep(i, n) for (int64_t i = n; i >= 0; i--)

#define chmax(a, b) (a) = max(a, b)
#define chmin(a, b) (a) = min(a, b)

int main() {
  int N;
  cin >> N;

  constexpr int MAXFACTOR = 1'000'000;
  vector<int> num_factor(MAXFACTOR + 1, 0);

  rep(i, N) {
    int64_t a;
    cin >> a;

    for (int64_t d = 1; d * d <= a; d++) {
      if (a % d == 0) {
        num_factor[d]++;
        if (d * d != a) {
          num_factor[a / d]++;
        }
      }
    }
  }
  num_factor[1] = 0;

  int result = 0;
  for (auto &elm : num_factor) {
    chmax(result, elm);
  }

  cout << (result <= 1 ? "pairwise coprime"
                       : (result < N ? "setwise coprime" : "not coprime"))
       << endl;
  cerr << result << endl;

  return 0;
}