#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <queue>
#include <iomanip> 
#define pb push_back
#define mp make_pair
#define fi first 
#define se second
#include <boost/math/common_factor.hpp> 
#define rep(i, a, b) for (long long i = a; i < b; i++)
#define per(j, a, b) for (long long j = a; j >= b; j--)
using namespace std;
long long gcd(long long a, long long b) {
   if (b == 0)
   return a;
   return gcd(b, a % b);
}
int main(){
	long long n, pr = 1;
	cin >> n;
	vector <long long> a(n);
	long long ans = 0;
	rep(i,0,n){
		cin >> a[i];
		pr*=a[i];
		if(i==1){
			ans = gcd(a[i], a[i-1]);
		}else{
			ans = gcd(ans, a[i]);
		}
	}
	if(ans>1){
		cout << "not coprime" << endl;
	}else{
		bool f = 1;
		long long an = a[n-1], prr = a[n-1];
		per(i,n-2,0){
			prr*=a[i];
			an = boost::math::lcm(an,a[i]) ;
			if(an!=prr){
				f=0;
				break;
			}
		}
		if(f){
			cout << "pairwise coprime" << endl;
		}else{
			cout << "setwise coprime" << endl;
		}
	}
}

