#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pi = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vs = vector<string>;
using vvs = vector<vs>;
using ld = long double;
template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
  os << "(" << p.first << "," << p.second << ")";
  return os;
}
template <class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << "{";
  for (int i = 0; i < ((int)v.size()); ++i) {
    if (i) os << ",";
    os << v[i];
  }
  os << "}";
  return os;
}
template <typename T, size_t S>
void printArray(const T (&array)[S]) {
  for (auto val : array) std::cout << val << ", ";
  std::cout << "\n";
}
const int mod = 1e9 + 7;
const int inf = 1e9 + 5;
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
const int MAX = 1e6 + 5;
vi isPrime(MAX);
vi primes;
void sieve() {
  for (int i = 0; i < (MAX); ++i) isPrime[i] = i;
  isPrime[0] = isPrime[1] = -1;
  for (int x = 2; x * x <= MAX; x++) {
    if (isPrime[x] != x) continue;
    for (int y = x; y < MAX; y += x) {
      isPrime[y] = x;
    }
  }
  for (int i = 0; i < (MAX); ++i)
    if (isPrime[i] == i) primes.push_back(i);
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << std::setprecision(10);
  int n;
  std::cin >> n;
  vi a(n);
  for (int i = 0; i < (n); ++i) std::cin >> a[i];
  bool ispc = true;
  sieve();
  for (int i = 0; i < (primes.size()); ++i) {
    int cnt = 0;
    for (int j = 0; j < (n); ++j) cnt += (a[j] % primes[i] == 0);
    if (cnt > 1) ispc = false;
  }
  if (ispc) {
    std::cout << "pairwise coprime"
              << "\n";
    return 0;
  }
  int gcdv = a[0];
  for (int i = 0; i < (n - 1); ++i) {
    gcdv = gcd(gcdv, a[i + 1]);
  }
  std::cout << (gcdv == 1 ? "setwise coprime" : "not coprime") << "\n";
}
