#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 10005000;
vector<long long> spf(MAXN + 1);
long long gcd1(long long a, long long b) {
  if (b == 0) return a;
  return gcd1(b, a % b);
}
void sieve() {
  spf[1] = 1;
  for (long long i = 2; i < MAXN; i++) spf[i] = i;
  for (long long i = 4; i < MAXN; i += 2) spf[i] = 2;
  for (long long i = 3; i * i < MAXN; i++) {
    if (spf[i] == i) {
      for (long long j = i; j < MAXN; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
vector<long long> getFactorization(long long x) {
  vector<long long> ret;
  long long count = 0;
  while (x != 1) {
    if (count == 0 || ret[count - 1] != spf[x]) {
      ret.push_back(spf[x]);
      count++;
    }
    x = x / spf[x];
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  sieve();
  long long n, m, i, j, k;
  cin >> n;
  vector<int> a(n);
  for (i = 0; i < n; i++) cin >> a[i];
  vector<long long> mark(n + 1, 0);
  long long flag = 1;
  for (i = 0; i < n && flag; i++) {
    if (a[i] == 1) continue;
    vector<long long> p = getFactorization(a[i]);
    long long k = p.size();
    for (j = 0; j < k && flag; j++) {
      if (mark[p[j]] == 0)
        mark[p[j]] = 1;
      else {
        flag = 0;
      }
    }
  }
  if (flag == 1)
    cout << "pairwise coprime";
  else {
    long long gcd = a[0];
    for (i = 1; i < n; i++) {
      gcd = gcd1(gcd, a[i]);
    }
    if (gcd == 1)
      cout << "setwise coprime";
    else
      cout << "not coprime";
  }
  return 0;
}
