#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void checkmin(T &a, const T &b) {
  if (b < a) a = b;
}
template <class T>
inline void checkmax(T &a, const T &b) {
  if (b > a) a = b;
}
const int maxn = 1e6 + 10;
int n, a[maxn], ans = 0;
bool exist[maxn];
inline bool prime(int val) {
  int now = val, sum = 0;
  for (int i = 2; i * i <= val; i++)
    if (now % i == 0) {
      sum++;
      if (exist[i]) return false;
      exist[i] = true;
      while (now % i == 0) now /= i;
    }
  return true;
}
inline int get_gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return get_gcd(b, a % b);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  if (n >= 200000) {
    int gcd = a[0];
    for (int i = 1; i < n; i++) gcd = get_gcd(a[i], gcd);
    printf(gcd == 1 ? "setwise coprime" : "not coprime");
    return 0;
  }
  bool flag = true;
  for (int i = 0; i < n; i++) flag &= prime(a[i]);
  if (flag) {
    printf("pairwise coprime");
    return 0;
  }
  int gcd = a[0];
  for (int i = 1; i < n; i++) gcd = get_gcd(a[i], gcd);
  printf(gcd == 1 ? "setwise coprime" : "not coprime");
  return 0;
}
