#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long g = a[0];
  for (long long i = 0; i < n; i++) {
    g = gcd(a[i], g);
  }
  if (g > 1) {
    printf("not coprime\n");
    return 0;
  }
  sort(a.begin(), a.end());
  set<long long> T;
  for (long long i = 0; i < n; i++) {
    set<long long>::iterator it;
    if (T.size() > 0) {
      for (it = T.begin(); it != T.end(); it++) {
        if (a[i] % *it == 0) {
          printf("setwise coprime\n");
          return 0;
        }
      }
    }
    long long num = a[i];
    for (long long j = 2; j * j <= num + 1; j++) {
      if (num % j != 0) continue;
      while (num % j == 0) {
        if (T.find(j) == T.end()) T.insert(j);
        num /= j;
      }
    }
    if (num != 1) T.insert(num);
  }
  printf("pairwise coprime\n");
  return 0;
}
