#include <bits/stdc++.h>
using namespace std;
int N;
bool table[1000001];
void ume(long long int a) {
  for (int i = a; i <= 1000000; i += a) {
    table[i] = true;
  }
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) {
    if (a != 1 && !table[a]) {
      ume(a);
    }
    return a;
  } else {
    return gcd(b, a % b);
  }
}
int main() {
  cin >> N;
  bool setwise = false;
  bool pairwise = true;
  long long int all = 0;
  vector<long long int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    all = gcd(A[i], all);
  }
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      if (gcd(A[i], A[j]) != 1) {
        pairwise = false;
      }
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (all == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
