/*Q-5---ATCODER-BEGINNER-#ROUND_177*/
#include <bits/stdc++.h>
#define MAX 1000001
#define endl '\n'
#define ll long long
using namespace std;

ll factors[MAX];

void findFactors(ll n){
	for(ll i=1;i<=sqrt(n);i++){
		if(n%i==0){
			if(n/i==i){
				factors[i]++;
			}
			else{
				factors[i]++;
				factors[n/i]++;
			}
		}
	}
}


int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    
	ll n{0};
	cin>>n;

	ll arr[n];
	for(ll i=0;i<n;i++)
		cin>>arr[i];

	//finding the GCD of all N-elements
	ll gcd=arr[0];
	for(ll i=0;i<n;i++){
		gcd=__gcd(gcd,arr[i]);
	}

	//
	for(ll i=0;i<n;i++){
		findFactors(arr[i]);
	}

	bool possible=true;
	for(ll i=2;i<MAX;i++){
		if(factors[i]>1){
			possible=false;
			break;
		}
	}

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

	return 0;
}