#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T BM(T p, T e, T M) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T mul(T p, T e, T M) {
  long long int ret = 0;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret + p);
    p = (p + p);
    if (ret >= M) ret -= M;
    if (p >= M) p -= M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T mdINV(T a, T M) {
  return BM(a, M - 2, M);
}
template <class T>
inline T PW(T p, T e) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p);
    p = (p * p);
  }
  return (T)ret;
}
template <class T>
bool ISLEFT(T a, T b, T c) {
  if (((a.first.first - b.first.first) * (b.second.second - c.second.second) -
       (b.first.first - c.first.first) * (a.second.second - b.second.second)) <
      0.0)
    return 1;
  else
    return 0;
}
int a[1000007 + 2];
bool vis[1000007 + 2];
int main() {
  int n;
  scanf("%d", &n);
  int ar[n + 2];
  int gc = 1;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ar[i]);
    vis[ar[i]] = 1;
    if (i == 1)
      gc = ar[i];
    else
      gc = gcd(gc, ar[i]);
  }
  bool fl = 0;
  for (int i = 2; i <= 1000007; i++) {
    if (a[i] == 0) {
      int cnt = 0;
      for (int j = i; j <= 1000007; j += i) {
        a[j] = 1;
        if (vis[j]) cnt++;
      }
      if (cnt > 1) {
        fl = 1;
        break;
      }
    }
  }
  if (!fl) {
    printf("pairwise coprime");
  } else if (gc == 1) {
    printf("setwise coprime");
  } else {
    printf("not coprime");
  }
  return 0;
}
