#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int c[N], sieve[N];
vector<int> primes;
int main() {
  int n, a;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a);
    c[a]++;
  }
  for (int i = 2; i < N; i++) {
    if (sieve[i]) continue;
    for (int j = 2 * i; j < N; j += i) {
      sieve[j] = 1;
    }
  }
  for (int i = 2; i < N; i++) {
    if (!sieve[i]) primes.push_back(i);
  }
  bool pairwise = 1;
  for (int i = 2; i < N; i++) {
    if (c[i] > 1) {
      pairwise = 0;
      break;
    }
    int cnt = 0;
    for (auto p : primes) {
      int e = i * p;
      if (e >= N) break;
      if (c[e]) cnt++;
      if (cnt > 1) {
        pairwise = 0;
        break;
      }
    }
    if (!pairwise) break;
  }
  if (pairwise) {
    puts("pairwise coprime");
    return 0;
  }
  bool setwise = 1;
  for (auto p : primes) {
    int sum = c[1];
    for (int i = p; i < N; i += p) sum += c[i];
    if (sum == n) {
      setwise = 0;
      break;
    }
  }
  if (setwise)
    puts("setwise coprime");
  else
    puts("not coprime");
}
