#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <iterator>
#include <numeric>
#include <cstdint>
#include <cmath>
#include <bitset>
#include <string>
#include <list>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <random>
#include <chrono>

#define N_TIMES(i, n)     for ( uint64_t i = 0;     i <  n; ++i )
#define N_TIMES_REV(i, n) for (  int64_t i = n - 1; i >= 0; --i )

template<typename T> using maximum_heap = std::priority_queue<T, std::vector<T>, std::less<T>>;
template<typename T> using minimum_heap = std::priority_queue<T, std::vector<T>, std::greater<T>>;

template<typename T>
std::istream& operator>>(std::istream &is, std::vector<T> &v)
{
  for (typename std::vector<T>::size_type i = 0; i < v.size(); ++i) {
    is >> v[i];
  }
  return is;
}

using namespace std;

const uint64_t M = 1e+6;

int main()
{
  uint64_t N;
  cin >> N;

  vector<uint64_t> A(N);
  cin >> A;

  vector<uint64_t> sieve(M + 1);
  N_TIMES(m, M) { sieve[m] = m; }
  for (uint64_t m = 2; m <= M; ++m) {
    if (sieve[m] != m) { continue; }
    
    uint64_t i = m << 1;
    while (i <= M) {
      sieve[i] = m;
      i += m;
    }
  }

  vector<uint64_t> factor(M + 1, 0);
  N_TIMES(n, N) {
    uint64_t x = A[n];
    while (x > 1) {
      ++factor[x];
      x /= sieve[x];
    }
  }
  
  bool pairwise_flag = true;
  for (uint64_t m = 2; m <= M; ++m) {
    if (factor[m] > 1) {
      pairwise_flag = false;
      break;
    }
  }
  
  if (pairwise_flag) {
    cout << "pairwise coprime" << endl;
  } else {
    uint64_t set_gcd = A[0];
    N_TIMES(n, N - 1) { set_gcd = gcd(set_gcd, A[n + 1]); }

    if (set_gcd == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }

  return 0;
}