#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
inline int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
bool isprime[maxn];
int a[maxn], prime[maxn], primesize;
bool vis[maxn], mark[maxn];
void init(int n) {
  memset(isprime, 1, sizeof(isprime));
  isprime[1] = false;
  for (int i = 2; i <= n; i++) {
    if (isprime[i]) prime[++primesize] = i;
    for (int j = 1; j <= primesize && i * prime[j] <= n; j++) {
      isprime[i * prime[j]] = false;
      if (i % prime[j] == 0) break;
    }
  }
}
bool deal(int x) {
  for (int i = 1; i <= primesize; i++) {
    if (x == 1) break;
    if (x % prime[i] == 0) {
      if (vis[prime[i]]) return false;
      vis[prime[i]] = true;
      while (x % prime[i] == 0) x /= prime[i];
    }
  }
  return true;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  init(1e6);
  int n;
  cin >> n;
  int res = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (i == 1)
      res = a[i];
    else if (res != 1)
      res = gcd(res, a[i]);
  }
  bool ans = true;
  for (int i = n; i >= 1; i--) {
    ans = deal(a[i]);
    if (ans == false) break;
  }
  if (ans)
    cout << "pairwise coprime";
  else if (res == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
