#include <bits/stdc++.h>
using namespace std;
using namespace std;
vector<int> prime(0);
void primeGeneration() {
  int N = 1000100;
  vector<bool> number(N, true);
  for (int i = 2; i * i <= N; i++) {
    for (int j = i + i; j <= N; j += i) {
      number[j] = false;
    }
  }
  for (int i = 2; i < N; i++) {
    if (number[i]) prime.push_back(i);
  }
};
int main() {
  primeGeneration();
  string ans = "pairwise coprime";
  int N;
  cin >> N;
  vector<int> A(N + 1, -99999);
  for (int i = 1; i <= N; i++) cin >> A[i];
  vector<bool> B(1001000, false);
  for (int i = 1; i <= N; i++) {
    if (A[i] == 1 || !B[A[i]])
      B[A[i]] = true;
    else
      ans = "setwise coprime";
  };
  for (int i = 0; i < prime.size(); i++) {
    int cnt = 0;
    int j = prime[i];
    while (j <= 1000100) {
      if (B[j]) cnt++;
      j += prime[i];
    }
    if (cnt >= 2) {
      if (ans == "pairwise coprime") ans = "setwise coprime";
      if (cnt == N) {
        ans = "not coprime";
        break;
      }
    }
  }
  cout << ans << endl;
}
