#pragma GCC target ("avx2")
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

vector<int> primeFactors(int n)  
{  
    // Print the number of 2s that divide n  
    vector<int> v;
    while (n % 2 == 0)  
    {  
        v.push_back(2);
        n = n/2;  
    }  
  
    // n must be odd at this point. So we can skip  
    // one element (Note i = i +2)  
    for (int i = 3; i <= sqrt(n); i = i + 2)  
    {  
        // While i divides n, print i and divide n  
        while (n % i == 0)  
        {  
            v.push_back(i);
            n = n/i;  
        }  
    }
    return v;
}  

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	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--){
		vector<int> v = primeFactors(arr[i]);
		for(int j = 0; j < v.size(); j++){
			if(m[v[j]]) flag = false;
		}
		for(int j = 0; j < v.size(); j++){
			m[v[j]] = 1;
		}
		m[arr[i]] = 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";
	
}