#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int nop[N], a[N];
int p[N], cnt;
int s[N];
int b[N], c;
int gcd(int n, int m) {
  if (m == 0) return n;
  return gcd(m, n % m);
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int _gcd = a[0];
  for (int i = 1; i < n; i++) {
    _gcd = gcd(_gcd, a[i]);
  }
  for (int i = 2; i < N; i++) {
    if (nop[i]) continue;
    for (int j = i + i; j < N; j += i) {
      nop[j] = 1;
    }
  }
  for (int i = 2; i * i < N; i++) {
    if (!nop[i]) p[cnt++] = i;
  }
  for (int i = 0; i < n; i++) {
    if (nop[a[i]]) b[c++] = a[i];
  }
  int f = 0;
  for (int i = 0; i < cnt; i++) {
    int g = 0;
    for (int j = 0; j < n; j++) {
      if (b[j] % p[i] == 0) {
        g++;
        if (g > 1) break;
      }
    }
    if (g > 1) {
      f = 1;
      break;
    }
  }
  if (f == 0 && _gcd == 1) {
    printf("pairwise coprime\n");
  } else if (_gcd == 1 && f)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
}
