#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e6 + 2;
vector<int> prime;
vector<bool> isPrime(MAX_N, 1);
void getPrime() {
  isPrime[0] = false, isPrime[1] = false;
  for (int i = 2; i <= sqrt(MAX_N); i++) {
    if (isPrime[i]) {
      for (int j = i + i; j < MAX_N; j += i) isPrime[j] = false;
    }
  }
  for (int i = 2; i < sqrt(MAX_N); i++)
    if (isPrime[i]) prime.push_back(i);
}
int GCD(int a, int b) {
  if (!b) return a;
  return GCD(b, a % b);
}
string mys1(vector<int> v) {
  getPrime();
  bool pair = true, set = true;
  for (auto i : prime) {
    int cnt = 0;
    for (auto j : v)
      if (GCD(i, j) != 1) cnt++;
    if (cnt > 1) pair = false;
    if (cnt == v.size()) set = false;
  }
  if (pair)
    return "pairwise coprime";
  else if (set)
    return "setwise coprime";
  else
    return "not coprime";
}
string mys2(vector<int> v) {
  bool suc = true;
  for (int i = 0; i < v.size(); i++)
    for (int j = i + 1; j < v.size(); j++)
      if (GCD(v[i], v[j]) != 1) suc = false;
  if (suc)
    return "pairwise coprime";
  else {
    int gcd = GCD(v[0], v[1]);
    for (int i = 2; i < v.size(); i++) gcd = GCD(gcd, v[i]);
    if (gcd == 1) return "setwise coprime";
  }
  return "not coprime";
}
int getRandomNumber(int min, int max) {
  random_device rn;
  mt19937_64 rnd(rn());
  uniform_int_distribution<int> range(min, max);
  return range(rnd);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  int t = 1;
  while (t--) {
    vector<int> v(N);
    for (auto& i : v) cin >> i;
    cout << mys1(v);
  }
}
