#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18 + 18;
const long long MAX = 200000;
const long long MOD = 1000000007;
int main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (long long i = (0); i < (N); i++) {
    cin >> A[i];
  }
  vector<long long> Pr(1000010, 0);
  for (long long i = (0); i < (N); i++) {
    for (long long j = (0); j < (1000); j++) {
      if (A[i] % (j + 2) == 0) {
        Pr[j + 2]++;
        while (A[i] % (j + 2) == 0) {
          A[i] /= (j + 2);
        }
        if (A[i] == 1) break;
      }
    }
  }
  for (long long i = (0); i < (100); i++) {
  }
  long long MAX = 0;
  for (long long i = (0); i < (1000010); i++) {
    MAX = max(MAX, Pr[i]);
  }
  if (MAX == 1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (MAX < N) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
