#include <bits/stdc++.h>
using namespace std;
template <typename T>
static inline void ArrayInput(vector<T> &A) {
  for (auto itr = A.begin(); itr < A.end(); ++itr) cin >> *itr;
}
template <typename T>
static inline void ArrayPut(const vector<T> &A) {
  for (auto itr = A.begin(); itr < A.end(); ++itr) cout << *itr << " ";
  cout << endl;
}
template <typename T>
static inline T ArraySum(vector<T> &A) {
  T res = 0;
  for (auto itr = A.begin(); itr < A.end(); ++itr) res += *itr;
  return res;
}
bool Sec_compare(pair<uint64_t, uint64_t> a, pair<uint64_t, uint64_t> b) {
  if (a.second != b.second) {
    return a.second < b.second;
  } else {
    return a.first > b.first;
  }
}
uint64_t dec_dig(uint64_t num) {
  uint64_t res = 0;
  while (num > 0) {
    num /= 10;
    ++res;
  }
  return res;
}
int64_t modinv(int64_t a, int64_t m) {
  int64_t b = m, u = 1, v = 0;
  while (b) {
    int64_t t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
uint64_t gcd(uint64_t a, uint64_t b) {
  if (a < b) {
    a ^= b;
    b ^= a;
    a ^= b;
  }
  return b ? gcd(b, a % b) : a;
}
int64_t My_Comb(uint64_t n, uint64_t k, int64_t m) {
  if (n < k) return 0;
  if (k == 0 || n == k) return 1;
  uint64_t res = 1;
  k = (n / 2 < k) ? n - k : k;
  for (uint64_t i = 1; i <= k; ++i)
    res = (((res * (n + 1 - i)) % m) * modinv(i, m)) % m;
  return res;
}
int64_t My_Pow(uint64_t a, uint64_t n, int64_t m) {
  uint64_t tmp = n, calc = 1;
  while (tmp > 0) {
    if (tmp % 2) {
      tmp--;
      calc *= a;
      calc %= m;
    } else {
      a *= a;
      a %= m;
      tmp /= 2;
    }
  }
  return calc;
}
class UnionFind {
 public:
  vector<uint64_t> Par;
  vector<uint64_t> sz;
  UnionFind(uint64_t n);
  uint64_t root(uint64_t x);
  bool same(uint64_t x, uint64_t y);
  void unite(uint64_t x, uint64_t y);
  uint64_t size(uint64_t x);
};
UnionFind::UnionFind(uint64_t n) {
  Par.resize(n);
  sz.assign(n, 1);
  for (uint64_t i = 0; i < n; ++i) Par[i] = i;
}
uint64_t UnionFind::root(uint64_t x) {
  if (Par[x] == x) {
    return x;
  } else {
    return Par[x] = root(Par[x]);
  }
}
bool UnionFind::same(uint64_t x, uint64_t y) { return root(x) == root(y); }
uint64_t UnionFind::size(uint64_t x) { return sz[root(x)]; }
void UnionFind::unite(uint64_t x, uint64_t y) {
  x = root(x);
  y = root(y);
  if (x == y) return;
  if (sz[x] < sz[y]) swap(x, y);
  sz[x] += sz[y];
  Par[y] = x;
}
template <typename T>
int64_t BinSearch(vector<T> &V, int64_t comp) {
  int64_t l = 0, r = V.size() - 1;
  if (V[l] > V[r]) swap(l, r);
  if (V[l] >= comp) return l;
  if (V[r] <= comp) return r;
  while (abs(r - l) > 1) {
    int64_t index = (l + r) / 2;
    if (V[index] == comp)
      return index;
    else if (V[index] > comp)
      r = index;
    else
      l = index;
  }
  if (abs(V[l] - comp) < abs(V[r] - comp))
    return l;
  else
    return r;
}
bool isPrime(uint32_t n) {
  if (n == 2) return true;
  if (n % 2) return false;
  for (uint32_t i = 3; i * i <= n; i += 2) {
    if (n % i == 0) return false;
  }
  return true;
}
int64_t calc(vector<int64_t> &A, uint32_t K) {
  int64_t res = 1;
  for (uint32_t i = 0; i < K; ++i) {
    res *= A[i];
    res %= (1000000007);
    if (res < 0) res += (1000000007);
  }
  return res;
}
std::vector<bool> IsPrime;
void sieve(size_t max) {
  if (max + 1 > IsPrime.size()) {
    IsPrime.resize(max + 1, true);
  }
  IsPrime[0] = false;
  IsPrime[1] = false;
  for (size_t i = 2; i <= max; ++i)
    if (IsPrime[i]) {
      for (size_t j = 2; i * j <= max; ++j) IsPrime[i * j] = false;
    }
}
set<uint32_t> proc(uint32_t num) {
  uint32_t tmp = num;
  set<uint32_t> p;
  if (IsPrime[num]) {
    p.insert(num);
    return p;
  }
  if (num % 2 == 0) p.insert(2);
  while (num % 2 == 0) num /= 2;
  for (uint32_t i = 3; i * i <= tmp; i += 2) {
    if (num == 1) break;
    if (IsPrime[i] == false) continue;
    if (num % i == 0) p.insert(i);
    while (num % i == 0) num /= i;
  }
  return p;
}
int main() {
  cout << setprecision(18);
  uint32_t N;
  cin >> N;
  vector<uint32_t> A(N);
  ArrayInput(A);
  sieve(N);
  bool flag = false;
  set<uint32_t> Used;
  for (uint32_t i = 0; i < N; ++i) {
    set<uint32_t> s = proc(A[i]);
    for (auto itr = s.begin(); itr != s.end(); ++itr) {
      if (Used.find(*itr) == Used.end()) {
        Used.insert(*itr);
      } else {
        flag = true;
        break;
      }
    }
    if (flag) {
      break;
    }
  }
  if (flag) {
    uint32_t tmp = A[0];
    for (uint32_t i = 1; i < N; ++i) {
      tmp = gcd(tmp, A[i]);
    }
    if (tmp == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  } else {
    cout << "pairwise coprime" << endl;
  }
  return 0;
}
