#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 100;
int a[maxn], vis[maxn], n;
int gcd(int x, int b) { return !b ? x : gcd(b, x % b); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  memset(a, 0, sizeof(a));
  memset(vis, 0, sizeof(vis));
  cin >> n;
  bool F = false;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (vis[a[i]]) F = true;
    if (F) continue;
    for (int j = 2; j <= sqrt(a[i]); j++) {
      if (a[i] % j == 0) {
        if (vis[j] || vis[a[i] / j]) {
          F = true;
          break;
        }
        vis[j] = vis[a[i] / j] = 1;
      }
    }
    vis[a[i]] = 1;
  }
  if (!F) {
    printf("pairwise coprime\n");
  } else {
    int x = a[1];
    for (int i = 2; i <= n; i++) x = gcd(x, a[i]);
    printf("%s\n", x == 1 ? "setwise coprime" : "not coprime");
  }
  return 0;
}
