#include <bits/stdc++.h>
using namespace std;
struct edge {
  long long to, cost;
};
long long ceil2(long long a, long long b) {
  if (a % b) {
    return a / b + 1;
  } else {
    return a / b;
  }
}
using namespace std;
struct UnionFind {
  vector<long long> par;
  vector<long long> sizes;
  UnionFind(long long N) : par(N), sizes(N, 1) {
    for (long long i = 0; i < N; i++) par[i] = i;
  }
  long long root(long long x) {
    if (par[x] == x) return x;
    return par[x] = root(par[x]);
  }
  void unite(long long x, long long y) {
    long long rx = root(x);
    long long ry = root(y);
    if (rx == ry) return;
    if (sizes[rx] < sizes[ry]) swap(rx, ry);
    par[ry] = rx;
    sizes[rx] += sizes[ry];
  }
  bool same(long long x, long long y) {
    long long rx = root(x);
    long long ry = root(y);
    return rx == ry;
  }
  long long size(long long x) { return sizes[root(x)]; }
};
long long gcd(long long a, long long b) {
  if (a == 0 || b == 0) return 0;
  if (a < b) {
    long long sw;
    sw = a;
    a = b;
    b = sw;
  }
  long long r;
  while ((r = a % b) != 0) {
    a = b;
    b = r;
  }
  return b;
}
long long lcm(long long a, long long b) {
  if (a == 0 || b == 0) return 0;
  return a / gcd(a, b) * b;
}
long long n, k, ans, sum;
long long a[1111111], flag[1111111];
signed main() {
  long long maxnum = 0;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    maxnum = max(a[i], maxnum);
    flag[a[i]] = 1;
  }
  long long pc = 1;
  for (long long i = 2; i <= maxnum; i++) {
    long long cnt = 0;
    for (long long j = 0; j <= maxnum; j += i) {
      if (flag[j]) {
        cnt++;
      }
    }
    if (cnt >= 2) {
      pc = 0;
      break;
    }
  }
  long long sc = 1;
  long long GCD = a[0];
  for (long long i = 0; i < n; i++) {
    GCD = gcd(GCD, a[i]);
  }
  if (GCD != 1) sc = 0;
  if (pc == 1)
    cout << "pairwise coprime" << endl;
  else if (pc == 0 && sc == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
