#include <bits/stdc++.h>
template <typename T>
using MaxHeap = std::priority_queue<T>;
template <typename T>
using MinHeap = std::priority_queue<T, std::vector<T>, std::greater<T>>;
template <typename T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
void vdeb(std::vector<T> &da) {
  for (int i = 0; i < da.size(); i++) {
    if (i == da.size() - 1)
      std::cout << da[i];
    else
      std::cout << da[i] << ' ';
  }
  std::cout << '\n';
}
template <typename T>
void vdeb(std::vector<std::vector<T>> &da) {
  for (int i = 0; i < da.size(); i++) {
    std::cout << i << ' ';
    vdeb(da[i]);
  }
  std::cout << '\n';
}
struct UnionFind {
  int size;
  std::vector<int> par;
  std::vector<int> rank;
  UnionFind(int x) {
    size = x;
    par = std::vector<int>(x);
    rank = std::vector<int>(x, 1);
    for (int i = 0; i < x; i++) par[i] = i;
  }
  int root(int x) {
    if (par[x] == x)
      return x;
    else
      return par[x] = root(par[x]);
  }
  void unite(int x, int y) {
    x = root(x);
    y = root(y);
    if (x == y) return;
    if (rank[x] < rank[y])
      par[x] = y;
    else
      par[y] = x;
    if (rank[x] == rank[y]) rank[x]++;
  }
  bool check(int x, int y) { return root(x) == root(y); }
  void initialize() {
    for (int i = 0; i < size; i++) {
      par[i] = i;
      rank[i] = 1;
    }
  }
};
using namespace std;
long long gcd(long long x, long long y) {
  if (x < y) swap(x, y);
  while (x % y) {
    long long tmp = y;
    y = x % y;
    x = tmp;
  }
  return y;
}
bool em[1010000];
void setwise(vector<int> &da) {
  int now = da[0];
  for (int i = (1); i < (int)(da.size()); i++) now = gcd(now, da[i]);
  if (now == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> da(n);
  for (int i = (0); i < (int)(n); i++) cin >> da[i];
  set<int> st;
  for (int i = (0); i < (int)(n); i++) st.insert(da[i]);
  if (st.size() < n) {
    setwise(da);
    return 0;
  }
  for (int i = (0); i < (int)(n); i++) em[da[i]] = true;
  for (int i = (2); i < (int)(1000001); i++) {
    int now = i, cnt = 0;
    while (now < 1010000) {
      if (em[now]) cnt++;
      now += i;
    }
    if (cnt > 1) {
      setwise(da);
      return 0;
    }
  }
  cout << "pairwise coprime\n";
}
