#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T>
void print(T t) {
  cout << t << endl;
}
ll MOD = 1000000007;
int main() {
  int N, maxA = 0;
  cin >> N;
  vector<int> A(N);
  for (auto& a : A) {
    cin >> a;
    maxA = max(maxA, a);
  }
  int maxW = 0;
  for (int p = 2; p <= maxA; p++) {
    int w = 0;
    for (const auto& a : A) {
      if (a % p == 0) w++;
    }
    maxW = max(maxW, w);
  }
  if (maxW == 1) {
    cout << "pairwise coprime" << endl;
  } else if (maxW == N) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
}
