#include <bits/stdc++.h>
using namespace std;
inline int D() {
  int t;
  scanf("%d", &t);
  return t;
}
inline long long llD() {
  long long t;
  scanf("%lld", &t);
  return t;
}
long long mod = 1e9 + 7;
const int OO = -1e6;
int xt[4] = {1, 0, 0, -1};
int yt[4] = {0, 1, -1, 0};
long long mem[100005][3], a[200005], b[105], n, m, k, frq[200005];
bool valid(int x, int y) { return x > -1 && y > -1 && x < n && y < m; }
void init() { memset(mem, -1, sizeof mem); }
int main() {
  init();
  int T = 1;
  while (T-- > 0) {
    bool B = 1;
    cin >> n;
    int ans = 0;
    long long m = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      for (int j = 1; j * j <= a[i]; j++) {
        if (a[i] % j == 0) {
          if (frq[a[i] / j] || frq[j]) {
            B = 0;
            ans++;
          }
          if (j == 1) {
            frq[a[i] / j]++;
            m = max(frq[a[i] / j], m);
          } else {
            frq[a[i] / j]++;
            frq[j]++;
            m = max(frq[j], m);
            m = max(frq[a[i] / j], m);
          }
        }
      }
    }
    if (B)
      cout << "pairwise coprime\n";
    else if (m == n)
      cout << "not coprime\n";
    else
      cout << "setwise coprime\n";
  }
}
