#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  return a % b == 0 ? b : gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
const int mod = 1000000007;
long long power(long long x, long long p) {
  long long a = 1;
  while (p > 0) {
    if (p % 2 == 0) {
      x *= x;
      p /= 2;
    } else {
      a *= x;
      p--;
    }
  }
  return a;
}
long long mpower(long long x, long long p) {
  long long a = 1;
  while (p > 0) {
    if (p % 2 == 0) {
      x = x * x % mod;
      p /= 2;
    } else {
      a = a * x % mod;
      p--;
    }
  }
  return a;
}
long long co(long long n, long long k) {
  long long a = 1;
  for (auto i = 1ll; i < k; i++) {
    a *= n - i + 1;
    a /= i;
  }
  return a;
}
long long mc(long long n, long long m) {
  long long k = 1, l = 1;
  for (auto i = n - m + 1; i < n + 1; i++) k = k * i % mod;
  for (auto i = 1; i < m + 1; i++) l = l * i % mod;
  l = mpower(l, mod - 2);
  return k * l % mod;
}
struct UnionFind {
  vector<int> par, s;
  UnionFind(int N) : par(N), s(N, 1) {
    for (auto i = 0; i < N; i++) par[i] = i;
  }
  int root(int x) { return par[x] == x ? x : par[x] = root(par[x]); }
  void unite(int x, int y) {
    x = root(x), y = root(y);
    if (x == y) return;
    if (s[x] < s[y]) swap(x, y);
    s[x] += s[y];
    par[y] = x;
  }
  bool same(int x, int y) { return root(x) == root(y); }
  int size(int x) { return s[root(x)]; }
  map<int, int> cnt() {
    map<int, int> cnt;
    for (auto v : par) cnt[root(v)]++;
    return cnt;
  }
};
int main(void) {
  int n;
  cin >> n;
  vector<int> a(n);
  map<int, int> mp;
  for (auto i = 0; i < n; i++) cin >> a[i];
  int g = a[0];
  for (auto i = 1; i < n; i++) {
    g = gcd(g, a[i]);
  }
  for (auto i = 0; i < n; i++) {
    int v = 2;
    while (a[i] != 1) {
      if (a[i] % v == 0) mp[v]++;
      while (a[i] % v == 0) {
        a[i] /= v;
      }
      v++;
    }
  }
  bool pa = true;
  for (auto m : mp) {
    if (m.second != 1) {
      pa = false;
    }
  }
  if (pa)
    puts("pairwise coprime");
  else if (g == 1)
    puts("set coprime");
  else
    puts("not coprime");
  return 0;
}
