#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <algorithm>
#define _USE_MATH_DEFINES
#include <cmath>
#include <numeric>
#include <iomanip>
#include <deque>
#include <tuple>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <unordered_map>
#include <sstream>
#include <stdexcept>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>

#define rep(i, x) for (int i = 0; i < (int)(x); i++)
#define FOR(i, a, done) for (int i = (a); i < (done); ++i)
#define all(a) (a).begin(), (a).end()
#define x first
#define y second
#define debug(a) cout << (a) << endl
namespace mp = boost::multiprecision;
using cpp_int = mp::cpp_int;
using ll = long long;
using namespace std;
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 (a > b)
	{
		a = b;
		return 1;
	}
	return 0;
}

ll M = 1000000007;
std::vector<int> sieve(int n) {
  std::vector<int> res(n);
  std::iota(res.begin(), res.end(), 0);
  for (int i = 2; i*i < n; ++i) {
    if (res[i] < i) continue;
    for (int j = i*i; j < n; j += i)
      if (res[j] == j) res[j] = i;
  }
  return res;
}
std::set<int> factor(int n, std::vector<int> min_factor) {
  // min_factor は sieve() で得られたものとする
  std::set<int> res;
  while (n > 1) {
    res.insert(min_factor[n]);
    n /= min_factor[n];
    // 割った後の値についても素因数を知っているので順次求まる
  }
  return res;
}
void solve()
{
	int n;
	cin>>n;
	bool pairwise=true;
	int setwise=1;
	vector<int>minf=sieve(1000'000);
	set<int>used;
	rep(i,n){
		int a;
		cin>>a;
		setwise=gcd(a,setwise);
		set<int>fac=factor(a,minf);
		for(auto i=fac.begin();i !=fac.end(); i++){
			if(used.count(*i)){
				pairwise=false;
			}else{
				used.insert(*i);
			}
		}
	}
	if(pairwise){
		cout<<"pairwise coprime"<<endl;
	}else if(setwise==1){
		cout<<"setwise coprime"<<endl;
	}else{
		cout<<"not coprime"<<endl;
	}
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	solve();
	return 0;
}
