#include <bits/stdc++.h>
using namespace std;
long long dx[4] = {1, 0, -1, 0};
long long dy[4] = {0, 1, 0, -1};
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename Cont, typename Func>
Cont fmap(const Cont &container, Func functor) {
  Cont result(container.size());
  std::transform(container.begin(), container.end(), result.begin(), functor);
  return result;
}
template <typename Cont, typename Pred>
Cont filter(const Cont &container, Pred predicate) {
  Cont result;
  std::copy_if(container.begin(), container.end(), std::back_inserter(result),
               predicate);
  return result;
}
template <typename T, typename... Args>
void ci(T &first, Args &...args) {
  ((cin >> first), ..., (cin >> args));
}
template <char Sep, typename T, typename... Args>
void print_seq(const T &first, const Args &...args) {
  ((cout << first), ..., (cout << Sep << args));
}
void co() { cout << endl; }
template <typename... Words>
void co(Words... words) {
  print_seq<' '>(words...);
  cout << endl;
}
int solve() {
  long long n;
  ci(n);
  vector<long long> a;
  for (long long i = 0, i_len = (n); i < i_len; i++) {
    long long buf;
    ci(buf);
    a.push_back(buf);
  }
  42;
  42;
  bool isprime[1000005];
  for (long long i = 0, i_len = (1000005); i < i_len; i++) isprime[i] = true;
  isprime[0] = false;
  isprime[1] = false;
  for (long long i = 2, i_len = (1000005); i < i_len; i++) {
    for (long long j = 2, j_len = (1000005 / i); j < j_len; j++) {
      if (i * j > 1000005) continue;
      isprime[i * j] = false;
    }
  }
  vector<long long> primes;
  for (long long i = 0, i_len = (1000005); i < i_len; i++) {
    if (isprime[i]) primes.push_back(i);
    if (i > (1000005 / 2 + 10)) break;
  }
  42;
  unordered_set<long long> prime_intersection;
  for (auto &(p) : (primes)) {
    if (a[0] % p == 0) {
      prime_intersection.insert(p);
    }
  }
  unordered_set<long long> prime_union;
  bool setwise = false;
  for (long long i = 0, i_len = (n); i < i_len; i++) {
    if (a[i] == 1) {
      prime_intersection.clear();
      continue;
    }
    if (isprime[a[i]]) {
      long long p = a[i];
      if (prime_intersection.count(p)) {
        prime_intersection.clear();
        prime_intersection.insert(p);
      } else {
        prime_intersection.clear();
      }
      if (prime_union.count(p)) {
        setwise = true;
      } else {
        prime_union.insert(p);
      }
      continue;
    }
    vector<long long> removes;
    for (auto &(p) : (prime_intersection)) {
      if (a[i] % p) removes.push_back(p);
    }
    for (auto &(r) : (removes)) prime_intersection.erase(r);
    long long buf = a[i];
    for (auto &(p) : (primes)) {
      if (buf < p) break;
      if (buf % p == 0) {
        while (buf % p == 0) buf /= p;
        if (prime_union.count(p)) {
          setwise = true;
        } else {
          prime_union.insert(p);
        }
      }
    }
  }
  if (!prime_intersection.empty()) {
    co("not coprime");
    return 0;
  }
  if (setwise) {
    co("setwise coprime");
  } else {
    co("pairwise coprime");
  }
  return 0;
}
int solve2() {
  long long n;
  ci(n);
  vector<long long> a;
  for (long long i = 0, i_len = (n); i < i_len; i++) {
    long long buf;
    ci(buf);
    a.push_back(buf);
  }
  42;
  42;
  bool isprime[1000005];
  for (long long i = 0, i_len = (1000005); i < i_len; i++) isprime[i] = true;
  isprime[0] = false;
  isprime[1] = false;
  for (long long i = 2, i_len = (1000005); i < i_len; i++) {
    for (long long j = 2, j_len = (1000005 / i); j < j_len; j++) {
      if (i * j > 1000005) continue;
      isprime[i * j] = false;
    }
  }
  vector<long long> primes;
  for (long long i = 0, i_len = (1000005); i < i_len; i++) {
    if (isprime[i]) primes.push_back(i);
    if (i > (1000005 / 2 + 10)) break;
  }
  42;
  unordered_set<long long> prime_intersection;
  for (auto &(p) : (primes)) {
    if (a[0] % p == 0) {
      prime_intersection.insert(p);
    }
  }
  unordered_set<long long> prime_union;
  bool setwise = false;
  for (long long i = 0, i_len = (n); i < i_len; i++) {
    if (a[i] == 1) {
      prime_intersection.clear();
      continue;
    }
    if (isprime[a[i]]) {
      long long p = a[i];
      if (prime_intersection.count(p)) {
        prime_intersection.clear();
        prime_intersection.insert(p);
      } else {
        prime_intersection.clear();
      }
      if (prime_union.count(p)) {
        setwise = true;
      } else {
        prime_union.insert(p);
      }
      continue;
    }
    vector<long long> removes;
    for (auto &(p) : (prime_intersection)) {
      if (a[i] % p) removes.push_back(p);
    }
    for (auto &(r) : (removes)) prime_intersection.erase(r);
    long long buf = a[i];
    for (auto &(p) : (primes)) {
      if (buf < p) break;
      if (buf % p == 0) {
        while (buf % p == 0) buf /= p;
        if (prime_union.count(p)) {
          setwise = true;
        } else {
          prime_union.insert(p);
        }
      }
    }
  }
  if (!prime_intersection.empty()) {
    co("not coprime");
    return 0;
  }
  if (setwise) {
    co("setwise coprime");
  } else {
    co("pairwise coprime");
  }
  return 0;
}
void solve3() {
  long long n;
  ci(n);
  vector<long long> a;
  for (long long i = 0, i_len = (n); i < i_len; i++) {
    long long buf;
    ci(buf);
    a.push_back(buf);
  }
  42;
  42;
  vector<vector<long long>> primelist;
  for (long long i = 0, i_len = (1000005); i < i_len; i++)
    primelist.emplace_back();
  for (long long i = 2, i_len = (1000005); i < i_len; i++) {
    for (long long j = 1, j_len = (1000005 / i); j < j_len; j++) {
      if (i * j > 1000005) break;
      primelist[i * j].push_back(i);
    }
  }
  unordered_set<long long> prime_intersection;
  for (auto &(p) : (primelist[a[0]])) prime_intersection.insert(p);
  unordered_set<long long> prime_union;
  bool setwise = false;
  for (long long i = 0, i_len = (n); i < i_len; i++) {
    if (a[i] == 1) {
      prime_intersection.clear();
      continue;
    }
    auto primes = primelist[a[i]];
    unordered_set<long long> keep;
    if (!prime_intersection.empty()) {
      for (auto &(p) : (primes)) {
        if (prime_intersection.count(p)) keep.insert(p);
      }
      prime_intersection = keep;
    }
    for (auto &(p) : (primes)) {
      if (prime_union.count(p)) {
        setwise = true;
      } else {
        prime_union.insert(p);
      }
    }
  }
  if (!prime_intersection.empty()) {
    co("not coprime");
    42;
    return;
  }
  if (setwise) {
    co("setwise coprime");
  } else {
    co("pairwise coprime");
  }
}
int main() {
  solve3();
  return 0;
}
