#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  bool pairwise = true;
  int tmpgcd = gcd(A.at(0), A.at(1));
  for (int i = 0; i < N - 2; i++) {
    tmpgcd = gcd(tmpgcd, A.at(i + 2));
  }
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; i++) {
      int x = gcd(A.at(i), A.at(i + j));
      if (x != 1) {
        pairwise = false;
        goto skip;
      }
    }
  }
skip:
  if (pairwise) {
    cout << "pairwise coprime";
  } else if (tmpgcd == 1) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
  return 0;
}
