#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef pair<ll,ll> pll;
typedef vector<ll> vll;
typedef vector<pll> vpll;
typedef vector<vll> vvll;

#define all(x) (x).begin(), (x).end()
#define fi first
#define se second

int main() 
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    int temp;
    int arr[n];
    for(int i=0;i<n;i++){
    	cin >> arr[i];
    }

    vector<set<int> > st;
    for(int i=0;i<n;i++){
    	temp = arr[i];

    	set<int> ss;
    	if(temp == 1)
    	ss.insert(1);
    	else{
    	for(int i1=2;i1*i1<=temp;i1++){
    		while(temp%i1 == 0){
    			temp/=i1;
    		}
    		ss.insert(i1);
    		if(temp!=1) ss.insert(temp);
    	}
    	}
    	st.push_back(ss);
    }


    bool yes = true;
    set<int> ch = st[0];
    for(int i=1;i<n;i++){
    	for(auto x : st[i]){
    		if(ch.count(x)!=0){
    			yes = false;
    			break;
    		}
    	}
    	if(!yes) break;
    }

    if(yes) {
    	cout<<"pairwise coprime"<<"\n";
    	return 0;
	}

	int ans = arr[0];
	for(int i=1;i<n;i++){
		ans = __gcd(arr[i],ans);
		if(ans == 1) break;
	}

    if(ans == 1) cout<<"setwise coprime"<<"\n";
    else cout<<"not coprime"<<"\n";
    return 0;
}
