#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];
	bool flag = true;
	map<int,int> m;
	for(int i = n-1; i >= 0; i--){
		for(int j = 2; j*j <= arr[i]; j++){
			if(arr[i]%j == 0){
				if(m[j]) flag = false;
				if(m[arr[i]/j]) flag = false;
				m[j] = 1;
				m[arr[i]/j] = 1;
			}
		}
	}
	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";
	
}