#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e+18 + 1;
typedef struct Point_Coordinates {
  long long x, y;
} point;
const long long MOD = 1000000007LL;
const long long mod = MOD;
string abc = "abcdefghijklmnopqrstuvwxyz";
string ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
vector<long long> dx = {0, 0, 1, -1};
vector<long long> dy = {1, -1, 0, 0};
map<long long, long long> prime_factor(long long n) {
  map<long long, long long> res;
  for (long long i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      res[i]++;
      n /= i;
    }
  }
  if (n != 1) res[n] = 1;
  return res;
}
const long long MAX = 2000010;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (long long i = 2; i < MAX; i++) {
    fac[i] = fac[i - 1] * i % MOD;
    inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
    finv[i] = finv[i - 1] * inv[i] % MOD;
  }
}
long long COM(long long n, long long k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
long long modpow(long long a, long long n) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
bool is_prime(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return n != 1;
}
vector<long long> divisor(long long n) {
  vector<long long> res;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      res.push_back(i);
      if (i != n / i) res.push_back(n / i);
    }
  }
  return res;
}
template <typename X>
struct SegTree {
  using FX = function<X(X, X)>;
  int n;
  FX fx;
  const X ex;
  vector<X> dat;
  SegTree(int n_, FX fx_, X ex_) : n(), fx(fx_), ex(ex_), dat(n_ * 4, ex_) {
    int x = 1;
    while (n_ > x) {
      x *= 2;
    }
    n = x;
  }
  void set(int i, X x) { dat[i + n - 1] = x; }
  void build() {
    for (int k = n - 2; k >= 0; k--)
      dat[k] = fx(dat[2 * k + 1], dat[2 * k + 2]);
  }
  void update(int i, X x) {
    i += n - 1;
    dat[i] = x;
    while (i > 0) {
      i = (i - 1) / 2;
      dat[i] = fx(dat[i * 2 + 1], dat[i * 2 + 2]);
    }
  }
  X query(int a, int b) { return query_sub(a, b, 0, 0, n); }
  X query_sub(int a, int b, int k, int l, int r) {
    if (r <= a || b <= l) {
      return ex;
    } else if (a <= l && r <= b) {
      return dat[k];
    } else {
      X vector<long long> = query_sub(a, b, k * 2 + 1, l, (l + r) / 2);
      X vr = query_sub(a, b, k * 2 + 2, (l + r) / 2, r);
      return fx(vector<long long>, vr);
    }
  }
  inline X operator[](int a) { return query(a, a + 1); }
  void print() {
    for (int i = 0; i < 2 * n - 1; ++i) {
      cout << (*this)[i];
      if (i != n) cout << ",";
    }
    cout << endl;
  }
};
template <int char_size, int base>
struct Trie {
  struct Node {
    vector<int> next;
    vector<int> accept;
    int c;
    int common;
    Node(int c_) : c(c_), common(0) { next.assign(char_size, -1); }
  };
  vector<Node> nodes;
  int root;
  Trie() : root(0) { nodes.push_back(Node(root)); }
  void insert(const string& word, int word_id) {
    int node_id = 0;
    for (int i = 0; i < (int)word.size(); i++) {
      int c = (int)(word[i] - base);
      int& next_id = nodes[node_id].next[c];
      if (next_id == -1) {
        next_id = (int)nodes.size();
        nodes.push_back(Node(c));
      }
      ++nodes[node_id].common;
      node_id = next_id;
    }
    ++nodes[node_id].common;
    nodes[node_id].accept.push_back(word_id);
  }
  void insert(const string& word) { insert(word, nodes[0].common); }
  bool search(const string& word, bool prefix = false) {
    int node_id = 0;
    for (int i = 0; i < (int)word.size(); i++) {
      int c = (int)(word[i] - base);
      int& next_id = nodes[node_id].next[c];
      if (next_id == -1) {
        return false;
      }
      node_id = next_id;
    }
    return (prefix) ? true : nodes[node_id].accept.size() > 0;
  }
  bool start_with(const string& prefix) { return search(prefix, true); }
  int count() const { return (nodes[0].common); }
  int size() const { return ((int)nodes.size()); }
};
class UnionFind {
 public:
  vector<long long> par;
  vector<long long> siz;
  UnionFind(long long sz_) : par(sz_), siz(sz_, 1LL) {
    for (long long i = 0; i < sz_; ++i) par[i] = i;
  }
  void init(long long sz_) {
    par.resize(sz_);
    siz.assign(sz_, 1LL);
    for (long long i = 0; i < sz_; ++i) par[i] = i;
  }
  long long root(long long x) {
    while (par[x] != x) {
      x = par[x] = par[par[x]];
    }
    return x;
  }
  bool merge(long long x, long long y) {
    x = root(x);
    y = root(y);
    if (x == y) return false;
    if (siz[x] < siz[y]) swap(x, y);
    siz[x] += siz[y];
    par[y] = x;
    return true;
  }
  bool issame(long long x, long long y) { return root(x) == root(y); }
  long long size(long long x) { return siz[root(x)]; }
};
vector<vector<long long> > cycle_partition(const vector<long long>& p) {
  long long n = p.size();
  vector<vector<long long> > ret;
  vector<bool> check(n, false);
  for (long long i = 0; i < (long long)(n); i++)
    if (!check[p[i]]) {
      vector<long long> v;
      long long pos = p[i];
      v.push_back(i);
      check[i] = true;
      while (pos != i) {
        v.push_back(pos);
        check[pos] = true;
        pos = p[pos];
      }
      ret.push_back(v);
    }
  return ret;
}
template <typename tuple<long long, long long, long long> >
tuple<long long, long long, long long> pow(
    tuple<long long, long long, long long> a, long long n,
    tuple<long long, long long, long long> e = 1) {
  tuple<long long, long long, long long> ret = e;
  while (n) {
    if (n & 1) ret *= a;
    a *= a;
    n >>= 1;
  }
  return ret;
}
template <int mod>
struct ModInt {
  int x;
  ModInt() : x(0) {}
  ModInt(long long x_) {
    if ((x = x_ % mod + mod) >= mod) x -= mod;
  }
  ModInt& operator+=(ModInt rhs) {
    if ((x += rhs.x) >= mod) x -= mod;
    return *this;
  }
  ModInt& operator-=(ModInt rhs) {
    if ((x -= rhs.x) < 0) x += mod;
    return *this;
  }
  ModInt& operator*=(ModInt rhs) {
    x = (unsigned long long)x * rhs.x % mod;
    return *this;
  }
  ModInt& operator/=(ModInt rhs) {
    x = (unsigned long long)x * rhs.inv().x % mod;
    return *this;
  }
  ModInt operator-() const { return -x < 0 ? mod - x : -x; }
  ModInt operator+(ModInt rhs) const { return ModInt(*this) += rhs; }
  ModInt operator-(ModInt rhs) const { return ModInt(*this) -= rhs; }
  ModInt operator*(ModInt rhs) const { return ModInt(*this) *= rhs; }
  ModInt operator/(ModInt rhs) const { return ModInt(*this) /= rhs; }
  bool operator==(ModInt rhs) const { return x == rhs.x; }
  bool operator!=(ModInt rhs) const { return x != rhs.x; }
  ModInt inv() const { return pow(*this, mod - 2); }
  friend ostream& operator<<(ostream& s, ModInt<mod> a) {
    s << a.x;
    return s;
  }
  friend istream& operator>>(istream& s, ModInt<mod>& a) {
    s >> a.x;
    return s;
  }
};
using mint = ModInt<MOD>;
template <typename tuple<long long, long long, long long> >
struct RMQ {
  int n;
  vector<tuple<long long, long long, long long> > dat, lazy;
  RMQ(int n_) : n(), dat(n_ * 4, INF), lazy(n_ * 4, INF) {
    int x = 1;
    while (n_ > x) x *= 2;
    n = x;
  }
  void eval(int k) {
    if (lazy[k] == INF) return;
    if (k < n - 1) {
      lazy[k * 2 + 1] = lazy[k];
      lazy[k * 2 + 2] = lazy[k];
    }
    dat[k] = lazy[k];
    lazy[k] = INF;
  }
  void update(int a, int b, tuple<long long, long long, long long> x, int k,
              int l, int r) {
    eval(k);
    if (a <= l && r <= b) {
      lazy[k] = x;
      eval(k);
    } else if (a < r && l < b) {
      update(a, b, x, k * 2 + 1, l, (l + r) / 2);
      update(a, b, x, k * 2 + 2, (l + r) / 2, r);
      dat[k] = min(dat[k * 2 + 1], dat[k * 2 + 2]);
    }
  }
  void update(int a, int b, tuple<long long, long long, long long> x) {
    update(a, b, x, 0, 0, n);
  }
  tuple<long long, long long, long long> query_sub(int a, int b, int k, int l,
                                                   int r) {
    eval(k);
    if (r <= a || b <= l) {
      return INF;
    } else if (a <= l && r <= b) {
      return dat[k];
    } else {
      tuple<long long, long long, long long> vector<long long> =
          query_sub(a, b, k * 2 + 1, l, (l + r) / 2);
      tuple<long long, long long, long long> vr =
          query_sub(a, b, k * 2 + 2, (l + r) / 2, r);
      return min(vector<long long>, vr);
    }
  }
  tuple<long long, long long, long long> query(int a, int b) {
    return query_sub(a, b, 0, 0, n);
  }
  inline tuple<long long, long long, long long> operator[](int a) {
    return query(a, a + 1);
  }
  void print() {
    for (int i = 0; i < 2 * n - 1; ++i) {
      cout << (*this)[i];
      if (i != n) cout << ",";
    }
    cout << endl;
  }
};
template <typename tuple<long long, long long, long long> >
bool chmax(tuple<long long, long long, long long>& a,
           const tuple<long long, long long, long long>& b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename tuple<long long, long long, long long> >
bool chmin(tuple<long long, long long, long long>& a,
           const tuple<long long, long long, long long>& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename tuple<long long, long long, long long> >
struct BIT {
  int n;
  vector<tuple<long long, long long, long long> > bit[2];
  BIT(int n_) { init(n_); }
  void init(int n_) {
    n = n_ + 1;
    for (int p = 0; p < 2; p++) bit[p].assign(n, 0);
  }
  void add_sub(int p, int i, tuple<long long, long long, long long> x) {
    for (int idx = i; idx < n; idx += (idx & -idx)) {
      bit[p][idx] += x;
    }
  }
  void add(int l, int r, tuple<long long, long long, long long> x) {
    add_sub(0, l, -x * (l - 1));
    add_sub(0, r, x * (r - 1));
    add_sub(1, l, x);
    add_sub(1, r, -x);
  }
  tuple<long long, long long, long long> sum_sub(int p, int i) {
    tuple<long long, long long, long long> s(0);
    for (int idx = i; idx > 0; idx -= (idx & -idx)) {
      s += bit[p][idx];
    }
    return s;
  }
  tuple<long long, long long, long long> sum(int i) {
    return sum_sub(0, i) + sum_sub(1, i) * i;
  }
  tuple<long long, long long, long long> query(int l, int r) {
    return sum(r - 1) - sum(l - 1);
  }
};
pair<bool, bool> Solve(long long n, vector<long long> a) {
  map<long long, long long> M;
  for (long long i = 0; i < (long long)(n); i++) M[a[i]]++;
  long long N = 1000010;
  bool pairc = true, setc = true;
  vector<long long> arr(N);
  {
    for (long long i = 0; i < N; i++) {
      arr[i] = 1;
    }
    arr[1] = 0;
    for (long long i = 2; i < sqrt(N); i++) {
      long long cnt = 0;
      if (arr[i]) {
        for (long long j = 0; i * (j + 2) < N; j++) {
          arr[i * (j + 2)] = 0;
          cnt += M[i * (j + 2)];
        }
      }
      if (cnt >= 2) pairc = false;
      if (cnt == n) setc = false;
    }
  }
  map<long long, long long> prime;
  for (long long i = 0; i < (long long)(n); i++) {
    if (arr[a[i]] == 0) prime[a[i]]++;
  }
  for (auto p : M) {
    if (p.first == 1) continue;
    if (p.second >= 2) pairc = false;
    if (p.second == n) setc = false;
  }
  pair<bool, bool> res;
  res.first = pairc;
  res.second = setc;
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  cout << fixed << setprecision(10);
  bool pairc = true, setc = true;
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> a[i];
  sort((a).begin(), (a).end());
  map<long long, long long> M = prime_factor(a[0]);
  vector<long long> flag(1000001);
  for (auto p : M) {
    long long x = p.first;
    long long cnt = 0;
    for (long long i = 0; i < (long long)(n); i++) {
      if (a[i] % x == 0) cnt++;
    }
    if (cnt == n) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  for (long long i = 0; i < (long long)(n); i++) {
    map<long long, long long> M = prime_factor(a[i]);
    for (auto p : M) {
      long long x = p.first;
      if (flag[x] == 1) continue;
      flag[x] = 1;
      long long cnt = 0;
      for (long long i = 0; i < (long long)(n); i++) {
        if (a[i] % x == 0) cnt++;
      }
      if (cnt >= 2) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << endl;
}
