#include <bits/stdc++.h>
using namespace std;
const int maxn = 10050;
const int maxm = 1000050;
long long p[maxm], a[maxm], s[maxm], cnt = 0;
bool vis[maxm];
void init() {
  for (int i = 2; i < maxn; ++i) {
    if (!vis[i]) p[cnt++] = i;
    for (int j = 0; j < cnt && p[j] * i < maxn; ++j) {
      vis[p[j] * i] = 1;
      if (i % p[j] == 0) break;
    }
  }
}
int main() {
  init();
  int n, mx = 0;
  cin >> n;
  memset(s, 0, sizeof(s));
  for (int i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    if (x > mx) mx = x;
    for (int j = 0; j < cnt; ++j)
      if (x % p[j] == 0) {
        s[p[j]]++;
        while (x % p[j] == 0) {
          x /= p[j];
        }
      }
    if (x > 1) s[x]++;
  }
  int f1 = 1, f2 = 1;
  for (int i = 1; i < mx; ++i) {
    if (s[i] > 1) f1 = 0;
    if (s[i] == n) f2 = 0;
  }
  if (f1) {
    cout << "pairwise coprime" << endl;
  } else {
    if (f2) {
      cout << "setwise coprime" << endl;
    } else
      cout << "not coprime" << endl;
  }
}
