#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
signed main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (long long i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  bool pair = true;
  for (long long i = 0; i < N - 1; i++) {
    for (long long j = i + 1; j < N; j++) {
      if (gcd(A.at(i), A.at(j)) > 1) {
        pair = false;
        break;
      }
    }
    if (!pair) {
      break;
    }
  }
  bool set = false;
  long long setgcd = A.at(0);
  for (long long i = 1; i < N; i++) {
    setgcd = gcd(setgcd, A.at(i));
    if (setgcd == 1) {
      set = true;
      break;
    }
  }
  if (pair) {
    cout << "pairwise coprime";
  } else if (set) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
}
