#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
	
	int n; cin>>n; int arr[n];
	for(int i = 0; i < n; i++) cin>>arr[i];
	int suf[n];
	for(int i = n-1; i >= 0; i--){
		if(i == n-1) suf[i] = arr[n-1];
		else suf[i] = __gcd(suf[i+1],arr[i]);
	}
	bool flag = true;
	for(int i = 0; i+1 < n; i++){
		if(__gcd(i,suf[i+1]) != 1) flag = false;
	}
	int xx = arr[0];
	for(int i = 1; i < n; i++){
		xx = __gcd(xx,arr[i]);
	}
	if(flag){
		cout<<"pairwise coprime"<<"\n";
	}
	else if(xx == 1) cout<<"setwise coprime"<<"\n";
	else cout<<"not coprime"<<"\n";
	
}