#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10, M = 1000;
int primes[M], cnt, a[N], cut[M];
bool st[N];
int n;
void get_primes() {
  for (int i = 2; i <= 1000; i++) {
    if (!st[N]) primes[cnt++] = i;
    for (int j = 0; i * primes[j] <= 1000; j++) {
      st[primes[j] * i] = true;
      if (i % primes[j] == 0) break;
    }
  }
}
int main() {
  get_primes();
  int res = 0, ans = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    a[x]++;
    ans = max(ans, a[x]);
    for (int j = 0; j < cnt; j++) {
      if (x % primes[j] == 0) {
        cut[primes[j]]++;
        res = max(cut[primes[j]], res);
      }
    }
  }
  if (res == 1 || res == 0)
    puts("pairwise coprime");
  else if (res == n || ans == n)
    puts("not coprime");
  else
    puts("setwise coprime");
  return 0;
}
