#include<bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
const unsigned int M = 1000000007;

int32_t main(){
    #ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin>>n;
    int a[n],g,pr=1;
    for(int i=0;i<n;i++){
    	cin>>a[i];
    	pr = (pr%M * a[i]%M)%M;
    }
    g=a[0];
    for(int i=1;i<n;i++){
    	g = (__gcd(g,a[i]))%M;
    }
    int l=a[0];
    for(int i=1;i<n;i++){
    	l = ((l%M*a[i]%M)/(__gcd(l,a[i])%M))%M;
    }
    if(pr==l){
    	cout<<"pairwise coprime";
    }
    else if(g==1){
    	cout<<"setwise coprime";
    }
    else{
    	cout<<"not coprime";
    }
    return 0;
}
